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

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 6040005: More cleanup of DefaultApps code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary change, add comments Created 9 years, 12 months 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/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 2c610e19ec17d86c1f589e2d918a4922306e283e..64d4ed811b1c4136ad6a25a865f52675339fbe1c 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -409,20 +409,16 @@ void ProfileImpl::RegisterComponentExtensions() {
}
void ProfileImpl::InstallDefaultApps() {
- // The web store only supports en-US at the moment, so we don't install
- // default apps in other locales.
- if (g_browser_process->GetApplicationLocale() != "en-US")
- return;
+ ExtensionService* extension_service = GetExtensionService();
+ DefaultApps* default_apps = extension_service->default_apps();
- ExtensionService* extensions_service = GetExtensionService();
- const ExtensionIdSet* app_ids =
- extensions_service->default_apps()->GetAppsToInstall();
- if (!app_ids)
+ if (!default_apps->ShouldInstallDefaultApps(extension_service->GetAppIds()))
return;
- for (ExtensionIdSet::const_iterator iter = app_ids->begin();
- iter != app_ids->end(); ++iter) {
- extensions_service->AddPendingExtensionFromDefaultAppList(*iter);
+ const ExtensionIdSet& app_ids = default_apps->default_apps();
+ for (ExtensionIdSet::const_iterator iter = app_ids.begin();
+ iter != app_ids.end(); ++iter) {
+ extension_service->AddPendingExtensionFromDefaultAppList(*iter);
}
}

Powered by Google App Engine
This is Rietveld 408576698