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

Unified Diff: chrome/browser/extensions/extension_startup_browsertest.cc

Issue 709813004: Remove the deprecated function ExtensionService::extensions(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed thestig@'s comments. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_startup_browsertest.cc
diff --git a/chrome/browser/extensions/extension_startup_browsertest.cc b/chrome/browser/extensions/extension_startup_browsertest.cc
index bfd1496a11ed935db5d0b3423359d83a3ab61efb..25e761d34d8c1c3d9e15485e06cdb263373e0552 100644
--- a/chrome/browser/extensions/extension_startup_browsertest.cc
+++ b/chrome/browser/extensions/extension_startup_browsertest.cc
@@ -109,15 +109,14 @@ class ExtensionStartupTestBase : public InProcessBrowserTest {
void WaitForServicesToStart(int num_expected_extensions,
bool expect_extensions_enabled) {
- ExtensionService* service = extensions::ExtensionSystem::Get(
- browser()->profile())->extension_service();
+ extensions::ExtensionRegistry* registry =
+ extensions::ExtensionRegistry::Get(browser()->profile());
// Count the number of non-component extensions.
int found_extensions = 0;
- for (extensions::ExtensionSet::const_iterator it =
- service->extensions()->begin();
- it != service->extensions()->end(); ++it) {
- if ((*it)->location() != extensions::Manifest::COMPONENT)
+ for (const scoped_refptr<const extensions::Extension>& extension :
+ registry->enabled_extensions()) {
+ if (extension->location() != extensions::Manifest::COMPONENT)
found_extensions++;
}
@@ -126,6 +125,9 @@ class ExtensionStartupTestBase : public InProcessBrowserTest {
ASSERT_EQ(static_cast<uint32>(num_expected_extensions),
static_cast<uint32>(found_extensions));
+
+ ExtensionService* service = extensions::ExtensionSystem::Get(
+ browser()->profile())->extension_service();
ASSERT_EQ(expect_extensions_enabled, service->extensions_enabled());
content::WindowedNotificationObserver user_scripts_observer(
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_view_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698