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

Side by Side Diff: chrome/browser/task_manager/task_manager_resource_providers.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, 1 month 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/task_manager/task_manager_resource_providers.h" 5 #include "chrome/browser/task_manager/task_manager_resource_providers.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 std::vector<Profile*> profiles(profile_manager->GetLoadedProfiles()); 1427 std::vector<Profile*> profiles(profile_manager->GetLoadedProfiles());
1428 size_t num_default_profiles = profiles.size(); 1428 size_t num_default_profiles = profiles.size();
1429 for (size_t i = 0; i < num_default_profiles; ++i) { 1429 for (size_t i = 0; i < num_default_profiles; ++i) {
1430 if (profiles[i]->HasOffTheRecordProfile()) { 1430 if (profiles[i]->HasOffTheRecordProfile()) {
1431 profiles.push_back(profiles[i]->GetOffTheRecordProfile()); 1431 profiles.push_back(profiles[i]->GetOffTheRecordProfile());
1432 } 1432 }
1433 } 1433 }
1434 1434
1435 for (size_t i = 0; i < profiles.size(); ++i) { 1435 for (size_t i = 0; i < profiles.size(); ++i) {
1436 ExtensionProcessManager* process_manager = 1436 ExtensionProcessManager* process_manager =
1437 profiles[i]->GetExtensionProcessManager(); 1437 extensions::ExtensionSystem::Get(profiles[i])->process_manager();
1438 if (process_manager) { 1438 if (process_manager) {
1439 const ExtensionProcessManager::ViewSet all_views = 1439 const ExtensionProcessManager::ViewSet all_views =
1440 process_manager->GetAllViews(); 1440 process_manager->GetAllViews();
1441 ExtensionProcessManager::ViewSet::const_iterator jt = all_views.begin(); 1441 ExtensionProcessManager::ViewSet::const_iterator jt = all_views.begin();
1442 for (; jt != all_views.end(); ++jt) { 1442 for (; jt != all_views.end(); ++jt) {
1443 content::RenderViewHost* rvh = *jt; 1443 content::RenderViewHost* rvh = *jt;
1444 // Don't add dead extension processes. 1444 // Don't add dead extension processes.
1445 if (!rvh->IsRenderViewLive()) 1445 if (!rvh->IsRenderViewLive())
1446 continue; 1446 continue;
1447 1447
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 case content::NOTIFICATION_WEB_CONTENTS_CONNECTED: 1868 case content::NOTIFICATION_WEB_CONTENTS_CONNECTED:
1869 Add(web_contents->GetRenderViewHost()); 1869 Add(web_contents->GetRenderViewHost());
1870 break; 1870 break;
1871 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED: 1871 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED:
1872 Remove(web_contents->GetRenderViewHost()); 1872 Remove(web_contents->GetRenderViewHost());
1873 break; 1873 break;
1874 default: 1874 default:
1875 NOTREACHED() << "Unexpected notification."; 1875 NOTREACHED() << "Unexpected notification.";
1876 } 1876 }
1877 } 1877 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager.cc ('k') | chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698