| 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_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // and |override_response_headers| are owned by a URLRequestJob. They are | 208 // and |override_response_headers| are owned by a URLRequestJob. They are |
| 209 // guaranteed to be valid until |callback| is called or OnURLRequestDestroyed | 209 // guaranteed to be valid until |callback| is called or OnURLRequestDestroyed |
| 210 // is called (whatever comes first). | 210 // is called (whatever comes first). |
| 211 // Do not modify |original_response_headers| directly but write new ones | 211 // Do not modify |original_response_headers| directly but write new ones |
| 212 // into |override_response_headers|. | 212 // into |override_response_headers|. |
| 213 int OnHeadersReceived( | 213 int OnHeadersReceived( |
| 214 void* profile, | 214 void* profile, |
| 215 extensions::InfoMap* extension_info_map, | 215 extensions::InfoMap* extension_info_map, |
| 216 net::URLRequest* request, | 216 net::URLRequest* request, |
| 217 const net::CompletionCallback& callback, | 217 const net::CompletionCallback& callback, |
| 218 GURL* new_url, |
| 218 const net::HttpResponseHeaders* original_response_headers, | 219 const net::HttpResponseHeaders* original_response_headers, |
| 219 scoped_refptr<net::HttpResponseHeaders>* override_response_headers); | 220 scoped_refptr<net::HttpResponseHeaders>* override_response_headers); |
| 220 | 221 |
| 221 // Dispatches the OnAuthRequired event to any extensions whose filters match | 222 // Dispatches the OnAuthRequired event to any extensions whose filters match |
| 222 // the given request. If the listener is not registered as "blocking", then | 223 // the given request. If the listener is not registered as "blocking", then |
| 223 // AUTH_REQUIRED_RESPONSE_OK is returned. Otherwise, | 224 // AUTH_REQUIRED_RESPONSE_OK is returned. Otherwise, |
| 224 // AUTH_REQUIRED_RESPONSE_IO_PENDING is returned and |callback| will be | 225 // AUTH_REQUIRED_RESPONSE_IO_PENDING is returned and |callback| will be |
| 225 // invoked later. | 226 // invoked later. |
| 226 net::NetworkDelegate::AuthRequiredResponse OnAuthRequired( | 227 net::NetworkDelegate::AuthRequiredResponse OnAuthRequired( |
| 227 void* profile, | 228 void* profile, |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 virtual void OnQuotaExceeded(const std::string& error) OVERRIDE; | 508 virtual void OnQuotaExceeded(const std::string& error) OVERRIDE; |
| 508 virtual bool RunImpl() OVERRIDE; | 509 virtual bool RunImpl() OVERRIDE; |
| 509 }; | 510 }; |
| 510 | 511 |
| 511 // Send updates to |host| with information about what webRequest-related | 512 // Send updates to |host| with information about what webRequest-related |
| 512 // extensions are installed. | 513 // extensions are installed. |
| 513 // TODO(mpcomplete): remove. http://crbug.com/100411 | 514 // TODO(mpcomplete): remove. http://crbug.com/100411 |
| 514 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); | 515 void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host); |
| 515 | 516 |
| 516 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ | 517 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_REQUEST_WEB_REQUEST_API_H_ |
| OLD | NEW |