OLD | NEW |
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 static SafeBrowsingBlockingPageFactory* factory_; | 184 static SafeBrowsingBlockingPageFactory* factory_; |
185 | 185 |
186 private: | 186 private: |
187 // Fills the passed dictionary with the values to be passed to the template | 187 // Fills the passed dictionary with the values to be passed to the template |
188 // when creating the HTML. | 188 // when creating the HTML. |
189 void PopulateExtendedReportingOption(base::DictionaryValue* load_time_data); | 189 void PopulateExtendedReportingOption(base::DictionaryValue* load_time_data); |
190 void PopulateMalwareLoadTimeData(base::DictionaryValue* load_time_data); | 190 void PopulateMalwareLoadTimeData(base::DictionaryValue* load_time_data); |
191 void PopulateHarmfulLoadTimeData(base::DictionaryValue* load_time_data); | 191 void PopulateHarmfulLoadTimeData(base::DictionaryValue* load_time_data); |
192 void PopulatePhishingLoadTimeData(base::DictionaryValue* load_time_data); | 192 void PopulatePhishingLoadTimeData(base::DictionaryValue* load_time_data); |
193 | 193 |
194 std::string GetHistogramPrefix() const; | 194 std::string GetUmaHistogramPrefix() const; |
| 195 std::string GetRapporMetricPrefix() const; |
195 std::string GetSamplingEventName() const; | 196 std::string GetSamplingEventName() const; |
196 | 197 |
197 scoped_ptr<SecurityInterstitialUmaHelper> uma_helper_; | 198 scoped_ptr<SecurityInterstitialUmaHelper> uma_helper_; |
198 | 199 |
199 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPage); | 200 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPage); |
200 }; | 201 }; |
201 | 202 |
202 // Factory for creating SafeBrowsingBlockingPage. Useful for tests. | 203 // Factory for creating SafeBrowsingBlockingPage. Useful for tests. |
203 class SafeBrowsingBlockingPageFactory { | 204 class SafeBrowsingBlockingPageFactory { |
204 public: | 205 public: |
205 virtual ~SafeBrowsingBlockingPageFactory() { } | 206 virtual ~SafeBrowsingBlockingPageFactory() { } |
206 | 207 |
207 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( | 208 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( |
208 SafeBrowsingUIManager* ui_manager, | 209 SafeBrowsingUIManager* ui_manager, |
209 content::WebContents* web_contents, | 210 content::WebContents* web_contents, |
210 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; | 211 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; |
211 }; | 212 }; |
212 | 213 |
213 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ | 214 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
OLD | NEW |