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

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

Issue 10694037: Add a policy to disable proceeding through the Safe Browsing interstitials. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed <button>/jstemplate 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
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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // Checks if we should even show the malware details option. For example, we 133 // Checks if we should even show the malware details option. For example, we
134 // don't show it in incognito mode. 134 // don't show it in incognito mode.
135 bool CanShowMalwareDetailsOption(); 135 bool CanShowMalwareDetailsOption();
136 136
137 // Called when the insterstitial is going away. If there is a 137 // Called when the insterstitial is going away. If there is a
138 // pending malware details object, we look at the user's 138 // pending malware details object, we look at the user's
139 // preferences, and if the option to send malware details is 139 // preferences, and if the option to send malware details is
140 // enabled, the report is scheduled to be sent on the |sb_service_|. 140 // enabled, the report is scheduled to be sent on the |sb_service_|.
141 void FinishMalwareDetails(int64 delay_ms); 141 void FinishMalwareDetails(int64 delay_ms);
142 142
143 // Returns the boolean value of the given |pref| from the PrefService of the
144 // Profile associated with |web_contents_|.
145 bool IsPrefEnabled(const char* pref);
146
143 // A list of SafeBrowsingService::UnsafeResource for a tab that the user 147 // A list of SafeBrowsingService::UnsafeResource for a tab that the user
144 // should be warned about. They are queued when displaying more than one 148 // should be warned about. They are queued when displaying more than one
145 // interstitial at a time. 149 // interstitial at a time.
146 static UnsafeResourceMap* GetUnsafeResourcesMap(); 150 static UnsafeResourceMap* GetUnsafeResourcesMap();
147 151
148 // Notifies the SafeBrowsingService on the IO thread whether to proceed or not 152 // Notifies the SafeBrowsingService on the IO thread whether to proceed or not
149 // for the |resources|. 153 // for the |resources|.
150 static void NotifySafeBrowsingService(SafeBrowsingService* sb_service, 154 static void NotifySafeBrowsingService(SafeBrowsingService* sb_service,
151 const UnsafeResourceList& resources, 155 const UnsafeResourceList& resources,
152 bool proceed); 156 bool proceed);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 public: 203 public:
200 virtual ~SafeBrowsingBlockingPageFactory() { } 204 virtual ~SafeBrowsingBlockingPageFactory() { }
201 205
202 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( 206 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage(
203 SafeBrowsingService* service, 207 SafeBrowsingService* service,
204 content::WebContents* web_contents, 208 content::WebContents* web_contents,
205 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; 209 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0;
206 }; 210 };
207 211
208 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ 212 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698