| 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; | |
| 113 void OnPACScriptError(int line_number, const base::string16& error) override; | 112 void OnPACScriptError(int line_number, const base::string16& error) override; |
| 114 net::NetworkDelegate::AuthRequiredResponse OnAuthRequired( | 113 net::NetworkDelegate::AuthRequiredResponse OnAuthRequired( |
| 115 net::URLRequest* request, | 114 net::URLRequest* request, |
| 116 const net::AuthChallengeInfo& auth_info, | 115 const net::AuthChallengeInfo& auth_info, |
| 117 const AuthCallback& callback, | 116 const AuthCallback& callback, |
| 118 net::AuthCredentials* credentials) override; | 117 net::AuthCredentials* credentials) override; |
| 119 | 118 |
| 120 scoped_refptr<extensions::EventRouterForwarder> event_router_; | 119 scoped_refptr<extensions::EventRouterForwarder> event_router_; |
| 121 | 120 |
| 122 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsNetworkDelegateImpl); | 121 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsNetworkDelegateImpl); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 229 |
| 231 NOTREACHED(); | 230 NOTREACHED(); |
| 232 } | 231 } |
| 233 | 232 |
| 234 void ChromeExtensionsNetworkDelegateImpl::OnURLRequestDestroyed( | 233 void ChromeExtensionsNetworkDelegateImpl::OnURLRequestDestroyed( |
| 235 net::URLRequest* request) { | 234 net::URLRequest* request) { |
| 236 ExtensionWebRequestEventRouter::GetInstance()->OnURLRequestDestroyed( | 235 ExtensionWebRequestEventRouter::GetInstance()->OnURLRequestDestroyed( |
| 237 profile_, request); | 236 profile_, request); |
| 238 } | 237 } |
| 239 | 238 |
| 240 void ChromeExtensionsNetworkDelegateImpl::OnURLRequestJobOrphaned( | |
| 241 net::URLRequest* request) { | |
| 242 ExtensionWebRequestEventRouter::GetInstance()->OnURLRequestJobOrphaned( | |
| 243 profile_, request); | |
| 244 } | |
| 245 | |
| 246 void ChromeExtensionsNetworkDelegateImpl::OnPACScriptError( | 239 void ChromeExtensionsNetworkDelegateImpl::OnPACScriptError( |
| 247 int line_number, | 240 int line_number, |
| 248 const base::string16& error) { | 241 const base::string16& error) { |
| 249 extensions::ProxyEventRouter::GetInstance()->OnPACScriptError( | 242 extensions::ProxyEventRouter::GetInstance()->OnPACScriptError( |
| 250 event_router_.get(), profile_, line_number, error); | 243 event_router_.get(), profile_, line_number, error); |
| 251 } | 244 } |
| 252 | 245 |
| 253 net::NetworkDelegate::AuthRequiredResponse | 246 net::NetworkDelegate::AuthRequiredResponse |
| 254 ChromeExtensionsNetworkDelegateImpl::OnAuthRequired( | 247 ChromeExtensionsNetworkDelegateImpl::OnAuthRequired( |
| 255 net::URLRequest* request, | 248 net::URLRequest* request, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 | 333 |
| 341 void ChromeExtensionsNetworkDelegate::OnCompleted( | 334 void ChromeExtensionsNetworkDelegate::OnCompleted( |
| 342 net::URLRequest* request, | 335 net::URLRequest* request, |
| 343 bool started) { | 336 bool started) { |
| 344 } | 337 } |
| 345 | 338 |
| 346 void ChromeExtensionsNetworkDelegate::OnURLRequestDestroyed( | 339 void ChromeExtensionsNetworkDelegate::OnURLRequestDestroyed( |
| 347 net::URLRequest* request) { | 340 net::URLRequest* request) { |
| 348 } | 341 } |
| 349 | 342 |
| 350 void ChromeExtensionsNetworkDelegate::OnURLRequestJobOrphaned( | |
| 351 net::URLRequest* request) { | |
| 352 } | |
| 353 | |
| 354 void ChromeExtensionsNetworkDelegate::OnPACScriptError( | 343 void ChromeExtensionsNetworkDelegate::OnPACScriptError( |
| 355 int line_number, | 344 int line_number, |
| 356 const base::string16& error) { | 345 const base::string16& error) { |
| 357 } | 346 } |
| 358 | 347 |
| 359 net::NetworkDelegate::AuthRequiredResponse | 348 net::NetworkDelegate::AuthRequiredResponse |
| 360 ChromeExtensionsNetworkDelegate::OnAuthRequired( | 349 ChromeExtensionsNetworkDelegate::OnAuthRequired( |
| 361 net::URLRequest* request, | 350 net::URLRequest* request, |
| 362 const net::AuthChallengeInfo& auth_info, | 351 const net::AuthChallengeInfo& auth_info, |
| 363 const AuthCallback& callback, | 352 const AuthCallback& callback, |
| 364 net::AuthCredentials* credentials) { | 353 net::AuthCredentials* credentials) { |
| 365 return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION; | 354 return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION; |
| 366 } | 355 } |
| OLD | NEW |