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

Unified Diff: chrome/browser/policy/policy_browsertest.cc

Issue 709813004: Remove the deprecated function ExtensionService::extensions(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Chrome OS compile failure. 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/policy/policy_browsertest.cc
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 753d1673437516522aabb07d44c037005c29c661..89fb7f1b57546349dc4aaee36d75d4d2fc56b3cb 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -722,12 +722,12 @@ class PolicyTest : public InProcessBrowserTest {
installer->Load(extension_path);
observer.Wait();
- const extensions::ExtensionSet* extensions =
- extension_service()->extensions();
- for (extensions::ExtensionSet::const_iterator it = extensions->begin();
- it != extensions->end(); ++it) {
- if ((*it)->path() == extension_path)
- return it->get();
+ extensions::ExtensionRegistry* registry =
+ extensions::ExtensionRegistry::Get(browser()->profile());
+ for (const scoped_refptr<const extensions::Extension>& extension :
+ registry->enabled_extensions()) {
+ if (extension->path() == extension_path)
+ return extension.get();
}
return NULL;
}

Powered by Google App Engine
This is Rietveld 408576698