OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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. |
11 // | 11 // |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // Usefull for tests, so they can provide their own implementation of | 129 // Usefull for tests, so they can provide their own implementation of |
130 // SafeBrowsingBlockingPage. | 130 // SafeBrowsingBlockingPage. |
131 static SafeBrowsingBlockingPageFactory* factory_; | 131 static SafeBrowsingBlockingPageFactory* factory_; |
132 | 132 |
133 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPage); | 133 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPage); |
134 }; | 134 }; |
135 | 135 |
136 // Factory for creating SafeBrowsingBlockingPage. Useful for tests. | 136 // Factory for creating SafeBrowsingBlockingPage. Useful for tests. |
137 class SafeBrowsingBlockingPageFactory { | 137 class SafeBrowsingBlockingPageFactory { |
138 public: | 138 public: |
| 139 ~SafeBrowsingBlockingPageFactory() { } |
| 140 |
139 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( | 141 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( |
140 SafeBrowsingService* service, | 142 SafeBrowsingService* service, |
141 TabContents* tab_contents, | 143 TabContents* tab_contents, |
142 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; | 144 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; |
143 protected: | |
144 ~SafeBrowsingBlockingPageFactory() {} | |
145 }; | 145 }; |
146 | 146 |
147 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ | 147 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
OLD | NEW |