| 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()));
|
| }
|
| }
|
| }
|
|
|