| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 // Returns true if the passed |unsafe_resources| is blocking the load of | 138 // Returns true if the passed |unsafe_resources| is blocking the load of |
| 139 // the main page. | 139 // the main page. |
| 140 static bool IsMainPageLoadBlocked( | 140 static bool IsMainPageLoadBlocked( |
| 141 const UnsafeResourceList& unsafe_resources); | 141 const UnsafeResourceList& unsafe_resources); |
| 142 | 142 |
| 143 friend class SafeBrowsingBlockingPageFactoryImpl; | 143 friend class SafeBrowsingBlockingPageFactoryImpl; |
| 144 | 144 |
| 145 // For reporting back user actions. | 145 // For reporting back user actions. |
| 146 SafeBrowsingUIManager* ui_manager_; | 146 SafeBrowsingUIManager* ui_manager_; |
| 147 base::MessageLoop* report_loop_; | |
| 148 | 147 |
| 149 // True if the interstitial is blocking the main page because it is on one | 148 // True if the interstitial is blocking the main page because it is on one |
| 150 // of our lists. False if a subresource is being blocked, or in the case of | 149 // of our lists. False if a subresource is being blocked, or in the case of |
| 151 // client-side detection where the interstitial is shown after page load | 150 // client-side detection where the interstitial is shown after page load |
| 152 // finishes. | 151 // finishes. |
| 153 bool is_main_frame_load_blocked_; | 152 bool is_main_frame_load_blocked_; |
| 154 | 153 |
| 155 // The index of a navigation entry that should be removed when DontProceed() | 154 // The index of a navigation entry that should be removed when DontProceed() |
| 156 // is invoked, -1 if not entry should be removed. | 155 // is invoked, -1 if not entry should be removed. |
| 157 int navigation_entry_index_to_remove_; | 156 int navigation_entry_index_to_remove_; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 public: | 196 public: |
| 198 virtual ~SafeBrowsingBlockingPageFactory() { } | 197 virtual ~SafeBrowsingBlockingPageFactory() { } |
| 199 | 198 |
| 200 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( | 199 virtual SafeBrowsingBlockingPage* CreateSafeBrowsingPage( |
| 201 SafeBrowsingUIManager* ui_manager, | 200 SafeBrowsingUIManager* ui_manager, |
| 202 content::WebContents* web_contents, | 201 content::WebContents* web_contents, |
| 203 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; | 202 const SafeBrowsingBlockingPage::UnsafeResourceList& unsafe_resources) = 0; |
| 204 }; | 203 }; |
| 205 | 204 |
| 206 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ | 205 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_BLOCKING_PAGE_H_ |
| OLD | NEW |