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

Side by Side Diff: chrome/browser/extensions/process_management_browsertest.cc

Issue 11365181: Remove GetExtensionService from Profile. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: replace missing extension_system include Created 8 years 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
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 "base/utf_string_conversions.h" 5 #include "base/utf_string_conversions.h"
6 #include "chrome/browser/automation/automation_util.h" 6 #include "chrome/browser/automation/automation_util.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/extensions/extension_process_manager.h" 9 #include "chrome/browser/extensions/extension_process_manager.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 process_manager(); 222 process_manager();
223 for (ExtensionProcessManager::const_iterator iter = 223 for (ExtensionProcessManager::const_iterator iter =
224 epm->background_hosts().begin(); 224 epm->background_hosts().begin();
225 iter != epm->background_hosts().end(); ++iter) { 225 iter != epm->background_hosts().end(); ++iter) {
226 process_ids.insert((*iter)->render_process_host()->GetID()); 226 process_ids.insert((*iter)->render_process_host()->GetID());
227 } 227 }
228 228
229 // We've loaded 5 extensions with background pages, 1 extension without 229 // We've loaded 5 extensions with background pages, 1 extension without
230 // background page, and one isolated app. We expect only 2 unique processes 230 // background page, and one isolated app. We expect only 2 unique processes
231 // hosting those extensions. 231 // hosting those extensions.
232 EXPECT_GE((size_t) 6, profile->GetExtensionService()->process_map()->size()); 232 ExtensionService* service =
233 extensions::ExtensionSystem::Get(profile)->extension_service();
234
235 EXPECT_GE((size_t) 6, service->process_map()->size());
233 EXPECT_EQ((size_t) 2, process_ids.size()); 236 EXPECT_EQ((size_t) 2, process_ids.size());
234 } 237 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/plugin_apitest.cc ('k') | chrome/browser/extensions/settings/settings_frontend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698