| 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 #ifndef CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_ | 5 #ifndef CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_ |
| 6 #define CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_ | 6 #define CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 // Callback for when the safe browsing check (which was initiated by | 126 // Callback for when the safe browsing check (which was initiated by |
| 127 // StartCheckingUrl()) has taken longer than kCheckUrlTimeoutMs. | 127 // StartCheckingUrl()) has taken longer than kCheckUrlTimeoutMs. |
| 128 void OnCheckUrlTimeout(); | 128 void OnCheckUrlTimeout(); |
| 129 | 129 |
| 130 // Starts displaying the safe browsing interstitial page if it's not | 130 // Starts displaying the safe browsing interstitial page if it's not |
| 131 // prerendering. Called on the UI thread. | 131 // prerendering. Called on the UI thread. |
| 132 static void StartDisplayingBlockingPage( | 132 static void StartDisplayingBlockingPage( |
| 133 const base::WeakPtr<SafeBrowsingResourceThrottle>& throttle, | 133 const base::WeakPtr<SafeBrowsingResourceThrottle>& throttle, |
| 134 scoped_refptr<safe_browsing::SafeBrowsingUIManager> ui_manager, | 134 scoped_refptr<safe_browsing::SafeBrowsingUIManager> ui_manager, |
| 135 const safe_browsing::SafeBrowsingUIManager::UnsafeResource& resource); | 135 const security_interstitials::UnsafeResource& resource); |
| 136 | 136 |
| 137 // Called on the IO thread if the request turned out to be for a prerendered | 137 // Called on the IO thread if the request turned out to be for a prerendered |
| 138 // page. | 138 // page. |
| 139 void Cancel(); | 139 void Cancel(); |
| 140 | 140 |
| 141 // Resumes the request, by continuing the deferred action (either starting the | 141 // Resumes the request, by continuing the deferred action (either starting the |
| 142 // request, or following a redirect). | 142 // request, or following a redirect). |
| 143 void ResumeRequest(); | 143 void ResumeRequest(); |
| 144 | 144 |
| 145 // For marking network events. |name| and |value| can be null. | 145 // For marking network events. |name| and |value| can be null. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 175 scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> database_manager_; | 175 scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> database_manager_; |
| 176 scoped_refptr<safe_browsing::SafeBrowsingUIManager> ui_manager_; | 176 scoped_refptr<safe_browsing::SafeBrowsingUIManager> ui_manager_; |
| 177 const net::URLRequest* request_; | 177 const net::URLRequest* request_; |
| 178 const content::ResourceType resource_type_; | 178 const content::ResourceType resource_type_; |
| 179 net::NetLogWithSource net_log_with_source_; | 179 net::NetLogWithSource net_log_with_source_; |
| 180 | 180 |
| 181 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceThrottle); | 181 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceThrottle); |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 #endif // CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_ | 184 #endif // CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_ |
| OLD | NEW |