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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 security_interstitials::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 | |
138 // page. | |
139 void Cancel(); | |
140 | |
141 // Resumes the request, by continuing the deferred action (either starting the | 137 // Resumes the request, by continuing the deferred action (either starting the |
142 // request, or following a redirect). | 138 // request, or following a redirect). |
143 void ResumeRequest(); | 139 void ResumeRequest(); |
144 | 140 |
145 // For marking network events. |name| and |value| can be null. | 141 // For marking network events. |name| and |value| can be null. |
146 void BeginNetLogEvent(net::NetLogEventType type, | 142 void BeginNetLogEvent(net::NetLogEventType type, |
147 const GURL& url, | 143 const GURL& url, |
148 const char* name, | 144 const char* name, |
149 const char* value); | 145 const char* value); |
150 void EndNetLogEvent(net::NetLogEventType type, | 146 void EndNetLogEvent(net::NetLogEventType type, |
(...skipping 24 matching lines...) Expand all Loading... |
175 scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> database_manager_; | 171 scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> database_manager_; |
176 scoped_refptr<safe_browsing::SafeBrowsingUIManager> ui_manager_; | 172 scoped_refptr<safe_browsing::SafeBrowsingUIManager> ui_manager_; |
177 const net::URLRequest* request_; | 173 const net::URLRequest* request_; |
178 const content::ResourceType resource_type_; | 174 const content::ResourceType resource_type_; |
179 net::NetLogWithSource net_log_with_source_; | 175 net::NetLogWithSource net_log_with_source_; |
180 | 176 |
181 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceThrottle); | 177 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceThrottle); |
182 }; | 178 }; |
183 | 179 |
184 #endif // CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_ | 180 #endif // CHROME_BROWSER_LOADER_SAFE_BROWSING_RESOURCE_THROTTLE_H_ |
OLD | NEW |