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

Unified Diff: chrome/browser/background/background_contents_service.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/background/background_contents_service.cc
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index 3b87006e1d76365b6d5286d62ce719ca6ab42ba2..5f8a3e8fc7d68cf7563cafa47b992e162012817a 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -593,18 +593,13 @@ void BackgroundContentsService::LoadBackgroundContentsFromDictionary(
void BackgroundContentsService::LoadBackgroundContentsFromManifests(
Profile* profile) {
- const extensions::ExtensionSet* extensions =
- extensions::ExtensionSystem::Get(profile)->
- extension_service()->extensions();
- for (extensions::ExtensionSet::const_iterator iter = extensions->begin();
- iter != extensions->end(); ++iter) {
- const Extension* extension = iter->get();
+ for (const scoped_refptr<const extensions::Extension>& extension :
+ extensions::ExtensionRegistry::Get(profile)->enabled_extensions()) {
if (extension->is_hosted_app() &&
- BackgroundInfo::HasBackgroundPage(extension)) {
- LoadBackgroundContents(profile,
- BackgroundInfo::GetBackgroundURL(extension),
- base::ASCIIToUTF16("background"),
- base::UTF8ToUTF16(extension->id()));
+ BackgroundInfo::HasBackgroundPage(extension.get())) {
+ LoadBackgroundContents(
+ profile, BackgroundInfo::GetBackgroundURL(extension.get()),
+ base::ASCIIToUTF16("background"), base::UTF8ToUTF16(extension->id()));
}
}
}

Powered by Google App Engine
This is Rietveld 408576698