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

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

Issue 10690102: Relanding https://chromiumcodereview.appspot.com/10694037 after a revert. The original CL failed on… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added TODO 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Checks if we should even show the malware details option. For example, we 138 // Checks if we should even show the malware details option. For example, we
139 // don't show it in incognito mode. 139 // don't show it in incognito mode.
140 bool CanShowMalwareDetailsOption(); 140 bool CanShowMalwareDetailsOption();
141 141
142 // Called when the insterstitial is going away. If there is a 142 // Called when the insterstitial is going away. If there is a
143 // pending malware details object, we look at the user's 143 // pending malware details object, we look at the user's
144 // preferences, and if the option to send malware details is 144 // preferences, and if the option to send malware details is
145 // enabled, the report is scheduled to be sent on the |sb_service_|. 145 // enabled, the report is scheduled to be sent on the |sb_service_|.
146 void FinishMalwareDetails(int64 delay_ms); 146 void FinishMalwareDetails(int64 delay_ms);
147 147
148 // Returns the boolean value of the given |pref| from the PrefService of the
149 // Profile associated with |web_contents_|.
150 bool IsPrefEnabled(const char* pref);
151
148 // A list of SafeBrowsingService::UnsafeResource for a tab that the user 152 // A list of SafeBrowsingService::UnsafeResource for a tab that the user
149 // should be warned about. They are queued when displaying more than one 153 // should be warned about. They are queued when displaying more than one
150 // interstitial at a time. 154 // interstitial at a time.
151 static UnsafeResourceMap* GetUnsafeResourcesMap(); 155 static UnsafeResourceMap* GetUnsafeResourcesMap();
152 156
153 // Notifies the SafeBrowsingService on the IO thread whether to proceed or not 157 // Notifies the SafeBrowsingService on the IO thread whether to proceed or not
154 // for the |resources|. 158 // for the |resources|.
155 static void NotifySafeBrowsingService(SafeBrowsingService* sb_service, 159 static void NotifySafeBrowsingService(SafeBrowsingService* sb_service,
156 const UnsafeResourceList& resources, 160 const UnsafeResourceList& resources,
157 bool proceed); 161 bool proceed);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 public: 218 public:
215 virtual ~SafeBrowsingBlockingPageFactory() { } 219 virtual ~SafeBrowsingBlockingPageFactory() { }
216 220
217 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( 221 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage(
218 SafeBrowsingService* service, 222 SafeBrowsingService* service,
219 content::WebContents* web_contents, 223 content::WebContents* web_contents,
220 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; 224 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0;
221 }; 225 };
222 226
223 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ 227 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698