Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page.h

Issue 10694107: Revert 145523 - Add a policy to disable proceeding through the Safe Browsing interstitials. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Classes for managing the SafeBrowsing interstitial pages. 5 // Classes for managing the SafeBrowsing interstitial pages.
6 // 6 //
7 // When a user is about to visit a page the SafeBrowsing system has deemed to 7 // When a user is about to visit a page the SafeBrowsing system has deemed to
8 // be malicious, either as malware or a phishing page, we show an interstitial 8 // be malicious, either as malware or a phishing page, we show an interstitial
9 // page with some options (go back, continue) to give the user a chance to avoid 9 // page with some options (go back, continue) to give the user a chance to avoid
10 // the harmful page. 10 // the harmful page.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // Checks if we should even show the malware details option. For example, we 139 // Checks if we should even show the malware details option. For example, we
140 // don't show it in incognito mode. 140 // don't show it in incognito mode.
141 bool CanShowMalwareDetailsOption(); 141 bool CanShowMalwareDetailsOption();
142 142
143 // Called when the insterstitial is going away. If there is a 143 // Called when the insterstitial is going away. If there is a
144 // pending malware details object, we look at the user's 144 // pending malware details object, we look at the user's
145 // preferences, and if the option to send malware details is 145 // preferences, and if the option to send malware details is
146 // enabled, the report is scheduled to be sent on the |sb_service_|. 146 // enabled, the report is scheduled to be sent on the |sb_service_|.
147 void FinishMalwareDetails(int64 delay_ms); 147 void FinishMalwareDetails(int64 delay_ms);
148 148
149 // Returns the boolean value of the given |pref| from the PrefService of the
150 // Profile associated with |web_contents_|.
151 bool IsPrefEnabled(const char* pref);
152
153 // A list of SafeBrowsingService::UnsafeResource for a tab that the user 149 // A list of SafeBrowsingService::UnsafeResource for a tab that the user
154 // should be warned about. They are queued when displaying more than one 150 // should be warned about. They are queued when displaying more than one
155 // interstitial at a time. 151 // interstitial at a time.
156 static UnsafeResourceMap* GetUnsafeResourcesMap(); 152 static UnsafeResourceMap* GetUnsafeResourcesMap();
157 153
158 // Notifies the SafeBrowsingService on the IO thread whether to proceed or not 154 // Notifies the SafeBrowsingService on the IO thread whether to proceed or not
159 // for the |resources|. 155 // for the |resources|.
160 static void NotifySafeBrowsingService(SafeBrowsingService* sb_service, 156 static void NotifySafeBrowsingService(SafeBrowsingService* sb_service,
161 const UnsafeResourceList& resources, 157 const UnsafeResourceList& resources,
162 bool proceed); 158 bool proceed);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 public: 215 public:
220 virtual ~SafeBrowsingBlockingPageFactory() { } 216 virtual ~SafeBrowsingBlockingPageFactory() { }
221 217
222 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( 218 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage(
223 SafeBrowsingService* service, 219 SafeBrowsingService* service,
224 content::WebContents* web_contents, 220 content::WebContents* web_contents,
225 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; 221 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0;
226 }; 222 };
227 223
228 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ 224 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698