| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 enum RequestStatus { REQUEST_STARTED, REQUEST_DONE }; | 27 enum RequestStatus { REQUEST_STARTED, REQUEST_DONE }; |
| 28 | 28 |
| 29 // Notifies the extensions::ProcessManager that a request has started or stopped | 29 // Notifies the extensions::ProcessManager that a request has started or stopped |
| 30 // for a particular RenderFrame. | 30 // for a particular RenderFrame. |
| 31 void NotifyEPMRequestStatus(RequestStatus status, | 31 void NotifyEPMRequestStatus(RequestStatus status, |
| 32 void* profile_id, | 32 void* profile_id, |
| 33 uint64 request_id, | 33 uint64 request_id, |
| 34 int process_id, | 34 int process_id, |
| 35 int render_frame_id) { | 35 int render_frame_id) { |
| 36 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 36 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 37 Profile* profile = reinterpret_cast<Profile*>(profile_id); | 37 Profile* profile = reinterpret_cast<Profile*>(profile_id); |
| 38 if (!g_browser_process->profile_manager()->IsValidProfile(profile)) | 38 if (!g_browser_process->profile_manager()->IsValidProfile(profile)) |
| 39 return; | 39 return; |
| 40 | 40 |
| 41 extensions::ProcessManager* process_manager = | 41 extensions::ProcessManager* process_manager = |
| 42 extensions::ProcessManager::Get(profile); | 42 extensions::ProcessManager::Get(profile); |
| 43 DCHECK(process_manager); | 43 DCHECK(process_manager); |
| 44 | 44 |
| 45 // Will be NULL if the request was not issued on behalf of a renderer (e.g. a | 45 // Will be NULL if the request was not issued on behalf of a renderer (e.g. a |
| 46 // system-level request). | 46 // system-level request). |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 } | 345 } |
| 346 | 346 |
| 347 net::NetworkDelegate::AuthRequiredResponse | 347 net::NetworkDelegate::AuthRequiredResponse |
| 348 ChromeExtensionsNetworkDelegate::OnAuthRequired( | 348 ChromeExtensionsNetworkDelegate::OnAuthRequired( |
| 349 net::URLRequest* request, | 349 net::URLRequest* request, |
| 350 const net::AuthChallengeInfo& auth_info, | 350 const net::AuthChallengeInfo& auth_info, |
| 351 const AuthCallback& callback, | 351 const AuthCallback& callback, |
| 352 net::AuthCredentials* credentials) { | 352 net::AuthCredentials* credentials) { |
| 353 return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION; | 353 return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION; |
| 354 } | 354 } |
| OLD | NEW |