| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/net/chrome_extensions_network_delegate.h" | 5 #include "chrome/browser/net/chrome_extensions_network_delegate.h" |
| 6 | 6 |
| 7 #include "net/base/net_errors.h" | 7 #include "net/base/net_errors.h" |
| 8 | 8 |
| 9 #if defined(ENABLE_EXTENSIONS) | 9 #if defined(ENABLE_EXTENSIONS) |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 net::URLRequest* request, | 102 net::URLRequest* request, |
| 103 const net::CompletionCallback& callback, | 103 const net::CompletionCallback& callback, |
| 104 const net::HttpResponseHeaders* original_response_headers, | 104 const net::HttpResponseHeaders* original_response_headers, |
| 105 scoped_refptr<net::HttpResponseHeaders>* override_response_headers, | 105 scoped_refptr<net::HttpResponseHeaders>* override_response_headers, |
| 106 GURL* allowed_unsafe_redirect_url) override; | 106 GURL* allowed_unsafe_redirect_url) override; |
| 107 void OnBeforeRedirect(net::URLRequest* request, | 107 void OnBeforeRedirect(net::URLRequest* request, |
| 108 const GURL& new_location) override; | 108 const GURL& new_location) override; |
| 109 void OnResponseStarted(net::URLRequest* request) override; | 109 void OnResponseStarted(net::URLRequest* request) override; |
| 110 void OnCompleted(net::URLRequest* request, bool started) override; | 110 void OnCompleted(net::URLRequest* request, bool started) override; |
| 111 void OnURLRequestDestroyed(net::URLRequest* request) override; | 111 void OnURLRequestDestroyed(net::URLRequest* request) override; |
| 112 void OnURLRequestJobOrphaned(net::URLRequest* request) override; |
| 112 void OnPACScriptError(int line_number, const base::string16& error) override; | 113 void OnPACScriptError(int line_number, const base::string16& error) override; |
| 113 net::NetworkDelegate::AuthRequiredResponse OnAuthRequired( | 114 net::NetworkDelegate::AuthRequiredResponse OnAuthRequired( |
| 114 net::URLRequest* request, | 115 net::URLRequest* request, |
| 115 const net::AuthChallengeInfo& auth_info, | 116 const net::AuthChallengeInfo& auth_info, |
| 116 const AuthCallback& callback, | 117 const AuthCallback& callback, |
| 117 net::AuthCredentials* credentials) override; | 118 net::AuthCredentials* credentials) override; |
| 118 | 119 |
| 119 scoped_refptr<extensions::EventRouterForwarder> event_router_; | 120 scoped_refptr<extensions::EventRouterForwarder> event_router_; |
| 120 | 121 |
| 121 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsNetworkDelegateImpl); | 122 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsNetworkDelegateImpl); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 230 |
| 230 NOTREACHED(); | 231 NOTREACHED(); |
| 231 } | 232 } |
| 232 | 233 |
| 233 void ChromeExtensionsNetworkDelegateImpl::OnURLRequestDestroyed( | 234 void ChromeExtensionsNetworkDelegateImpl::OnURLRequestDestroyed( |
| 234 net::URLRequest* request) { | 235 net::URLRequest* request) { |
| 235 ExtensionWebRequestEventRouter::GetInstance()->OnURLRequestDestroyed( | 236 ExtensionWebRequestEventRouter::GetInstance()->OnURLRequestDestroyed( |
| 236 profile_, request); | 237 profile_, request); |
| 237 } | 238 } |
| 238 | 239 |
| 240 void ChromeExtensionsNetworkDelegateImpl::OnURLRequestJobOrphaned( |
| 241 net::URLRequest* request) { |
| 242 ExtensionWebRequestEventRouter::GetInstance()->OnURLRequestJobOrphaned( |
| 243 profile_, request); |
| 244 } |
| 245 |
| 239 void ChromeExtensionsNetworkDelegateImpl::OnPACScriptError( | 246 void ChromeExtensionsNetworkDelegateImpl::OnPACScriptError( |
| 240 int line_number, | 247 int line_number, |
| 241 const base::string16& error) { | 248 const base::string16& error) { |
| 242 extensions::ProxyEventRouter::GetInstance()->OnPACScriptError( | 249 extensions::ProxyEventRouter::GetInstance()->OnPACScriptError( |
| 243 event_router_.get(), profile_, line_number, error); | 250 event_router_.get(), profile_, line_number, error); |
| 244 } | 251 } |
| 245 | 252 |
| 246 net::NetworkDelegate::AuthRequiredResponse | 253 net::NetworkDelegate::AuthRequiredResponse |
| 247 ChromeExtensionsNetworkDelegateImpl::OnAuthRequired( | 254 ChromeExtensionsNetworkDelegateImpl::OnAuthRequired( |
| 248 net::URLRequest* request, | 255 net::URLRequest* request, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 340 |
| 334 void ChromeExtensionsNetworkDelegate::OnCompleted( | 341 void ChromeExtensionsNetworkDelegate::OnCompleted( |
| 335 net::URLRequest* request, | 342 net::URLRequest* request, |
| 336 bool started) { | 343 bool started) { |
| 337 } | 344 } |
| 338 | 345 |
| 339 void ChromeExtensionsNetworkDelegate::OnURLRequestDestroyed( | 346 void ChromeExtensionsNetworkDelegate::OnURLRequestDestroyed( |
| 340 net::URLRequest* request) { | 347 net::URLRequest* request) { |
| 341 } | 348 } |
| 342 | 349 |
| 350 void ChromeExtensionsNetworkDelegate::OnURLRequestJobOrphaned( |
| 351 net::URLRequest* request) { |
| 352 } |
| 353 |
| 343 void ChromeExtensionsNetworkDelegate::OnPACScriptError( | 354 void ChromeExtensionsNetworkDelegate::OnPACScriptError( |
| 344 int line_number, | 355 int line_number, |
| 345 const base::string16& error) { | 356 const base::string16& error) { |
| 346 } | 357 } |
| 347 | 358 |
| 348 net::NetworkDelegate::AuthRequiredResponse | 359 net::NetworkDelegate::AuthRequiredResponse |
| 349 ChromeExtensionsNetworkDelegate::OnAuthRequired( | 360 ChromeExtensionsNetworkDelegate::OnAuthRequired( |
| 350 net::URLRequest* request, | 361 net::URLRequest* request, |
| 351 const net::AuthChallengeInfo& auth_info, | 362 const net::AuthChallengeInfo& auth_info, |
| 352 const AuthCallback& callback, | 363 const AuthCallback& callback, |
| 353 net::AuthCredentials* credentials) { | 364 net::AuthCredentials* credentials) { |
| 354 return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION; | 365 return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION; |
| 355 } | 366 } |
| OLD | NEW |