OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 13 matching lines...) Expand all Loading... | |
24 // notifications while the first interstitial is showing is queued. If the user | 24 // notifications while the first interstitial is showing is queued. If the user |
25 // decides to proceed in the first interstitial, we display all queued unsafe | 25 // decides to proceed in the first interstitial, we display all queued unsafe |
26 // resources in a new interstitial. | 26 // resources in a new interstitial. |
27 | 27 |
28 #ifndef IOS_CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ | 28 #ifndef IOS_CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
29 #define IOS_CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ | 29 #define IOS_CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
30 | 30 |
31 #include <map> | 31 #include <map> |
32 #include <string> | 32 #include <string> |
33 #include <vector> | 33 #include <vector> |
34 | 34 |
noyau (Ping after 24h)
2016/04/07 13:34:04
#include <memory>
| |
35 #include "base/macros.h" | 35 #include "base/macros.h" |
36 #include "ios/chrome/browser/interstitials/ios_security_interstitial_page.h" | 36 #include "ios/chrome/browser/interstitials/ios_security_interstitial_page.h" |
37 #include "ios/chrome/browser/safe_browsing/ui_manager.h" | 37 #include "ios/chrome/browser/safe_browsing/ui_manager.h" |
38 #include "url/gurl.h" | 38 #include "url/gurl.h" |
39 | 39 |
40 namespace web { | 40 namespace web { |
41 class WebState; | 41 class WebState; |
42 } | 42 } |
43 | 43 |
44 namespace safe_browsing { | 44 namespace safe_browsing { |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
141 void PopulateMalwareLoadTimeData(base::DictionaryValue* load_time_data) const; | 141 void PopulateMalwareLoadTimeData(base::DictionaryValue* load_time_data) const; |
142 void PopulateHarmfulLoadTimeData(base::DictionaryValue* load_time_data) const; | 142 void PopulateHarmfulLoadTimeData(base::DictionaryValue* load_time_data) const; |
143 void PopulatePhishingLoadTimeData( | 143 void PopulatePhishingLoadTimeData( |
144 base::DictionaryValue* load_time_data) const; | 144 base::DictionaryValue* load_time_data) const; |
145 | 145 |
146 std::string GetMetricPrefix() const; | 146 std::string GetMetricPrefix() const; |
147 std::string GetExtraMetricsSuffix() const; | 147 std::string GetExtraMetricsSuffix() const; |
148 std::string GetRapporPrefix() const; | 148 std::string GetRapporPrefix() const; |
149 std::string GetSamplingEventName() const; | 149 std::string GetSamplingEventName() const; |
150 | 150 |
151 scoped_ptr<IOSChromeControllerClient> controller_; | 151 std::unique_ptr<IOSChromeControllerClient> controller_; |
152 | 152 |
153 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPage); | 153 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPage); |
154 }; | 154 }; |
155 | 155 |
156 // Factory for creating SafeBrowsingBlockingPage. Useful for tests. | 156 // Factory for creating SafeBrowsingBlockingPage. Useful for tests. |
157 class SafeBrowsingBlockingPageFactory { | 157 class SafeBrowsingBlockingPageFactory { |
158 public: | 158 public: |
159 virtual ~SafeBrowsingBlockingPageFactory() {} | 159 virtual ~SafeBrowsingBlockingPageFactory() {} |
160 | 160 |
161 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( | 161 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( |
162 SafeBrowsingUIManager* ui_manager, | 162 SafeBrowsingUIManager* ui_manager, |
163 web::WebState* web_state, | 163 web::WebState* web_state, |
164 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; | 164 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; |
165 }; | 165 }; |
166 | 166 |
167 } // namespace safe_browsing | 167 } // namespace safe_browsing |
168 | 168 |
169 #endif // IOS_CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ | 169 #endif // IOS_CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
OLD | NEW |