Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 11246003: Remove Profile->GetExtensionProcessManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix extension_crash_recovery_browsertest Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "chrome/browser/net/chrome_network_delegate.h" 5 #include "chrome/browser/net/chrome_network_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/browser/api/prefs/pref_member.h" 10 #include "chrome/browser/api/prefs/pref_member.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/content_settings/cookie_settings.h" 12 #include "chrome/browser/content_settings/cookie_settings.h"
13 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 13 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
14 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" 14 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
15 #include "chrome/browser/extensions/api/proxy/proxy_api.h" 15 #include "chrome/browser/extensions/api/proxy/proxy_api.h"
16 #include "chrome/browser/extensions/api/web_request/web_request_api.h" 16 #include "chrome/browser/extensions/api/web_request/web_request_api.h"
17 #include "chrome/browser/extensions/event_router_forwarder.h" 17 #include "chrome/browser/extensions/event_router_forwarder.h"
18 #include "chrome/browser/extensions/extension_info_map.h" 18 #include "chrome/browser/extensions/extension_info_map.h"
19 #include "chrome/browser/extensions/extension_process_manager.h" 19 #include "chrome/browser/extensions/extension_process_manager.h"
20 #include "chrome/browser/extensions/extension_system.h"
20 #include "chrome/browser/net/load_time_stats.h" 21 #include "chrome/browser/net/load_time_stats.h"
21 #include "chrome/browser/performance_monitor/performance_monitor.h" 22 #include "chrome/browser/performance_monitor/performance_monitor.h"
22 #include "chrome/browser/prefs/pref_service.h" 23 #include "chrome/browser/prefs/pref_service.h"
23 #include "chrome/browser/profiles/profile_manager.h" 24 #include "chrome/browser/profiles/profile_manager.h"
24 #include "chrome/browser/task_manager/task_manager.h" 25 #include "chrome/browser/task_manager/task_manager.h"
25 #include "chrome/common/pref_names.h" 26 #include "chrome/common/pref_names.h"
26 #include "chrome/common/url_constants.h" 27 #include "chrome/common/url_constants.h"
27 #include "content/public/browser/browser_thread.h" 28 #include "content/public/browser/browser_thread.h"
28 #include "content/public/browser/render_view_host.h" 29 #include "content/public/browser/render_view_host.h"
29 #include "content/public/browser/resource_request_info.h" 30 #include "content/public/browser/resource_request_info.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void NotifyEPMRequestStatus(RequestStatus status, 95 void NotifyEPMRequestStatus(RequestStatus status,
95 void* profile_id, 96 void* profile_id,
96 int process_id, 97 int process_id,
97 int render_view_id) { 98 int render_view_id) {
98 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 99 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
99 Profile* profile = reinterpret_cast<Profile*>(profile_id); 100 Profile* profile = reinterpret_cast<Profile*>(profile_id);
100 if (!g_browser_process->profile_manager()->IsValidProfile(profile)) 101 if (!g_browser_process->profile_manager()->IsValidProfile(profile))
101 return; 102 return;
102 103
103 ExtensionProcessManager* extension_process_manager = 104 ExtensionProcessManager* extension_process_manager =
104 profile->GetExtensionProcessManager(); 105 extensions::ExtensionSystem::Get(profile)->process_manager();
105 // This may be NULL in unit tests. 106 // This may be NULL in unit tests.
106 if (!extension_process_manager) 107 if (!extension_process_manager)
107 return; 108 return;
108 109
109 // Will be NULL if the request was not issued on behalf of a renderer (e.g. a 110 // Will be NULL if the request was not issued on behalf of a renderer (e.g. a
110 // system-level request). 111 // system-level request).
111 RenderViewHost* render_view_host = 112 RenderViewHost* render_view_host =
112 RenderViewHost::FromID(process_id, render_view_id); 113 RenderViewHost::FromID(process_id, render_view_id);
113 if (render_view_host) { 114 if (render_view_host) {
114 if (status == REQUEST_STARTED) { 115 if (status == REQUEST_STARTED) {
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 #endif 450 #endif
450 return net::OK; 451 return net::OK;
451 } 452 }
452 453
453 void ChromeNetworkDelegate::OnRequestWaitStateChange( 454 void ChromeNetworkDelegate::OnRequestWaitStateChange(
454 const net::URLRequest& request, 455 const net::URLRequest& request,
455 RequestWaitState state) { 456 RequestWaitState state) {
456 if (load_time_stats_) 457 if (load_time_stats_)
457 load_time_stats_->OnRequestWaitStateChange(request, state); 458 load_time_stats_->OnRequestWaitStateChange(request, state);
458 } 459 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/window_open_apitest.cc ('k') | chrome/browser/profiles/off_the_record_profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698