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

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

Issue 2149953002: Enable login screen apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Stefan feedback Created 3 years, 9 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/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 46ddb77bd244b70ec9440edda53a4dffc945c18c..50c00cf0d76056e653b19c3afa1085bcfd072235 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -105,6 +105,7 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/extensions/install_limiter.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "storage/browser/fileapi/file_system_backend.h"
#include "storage/browser/fileapi/file_system_context.h"
#endif
@@ -439,9 +440,22 @@ void ExtensionService::Init() {
DCHECK(!is_ready()); // Can't redo init.
DCHECK_EQ(registry_->enabled_extensions().size(), 0u);
- // LoadAllExtensions() calls OnLoadedInstalledExtensions().
component_loader_->LoadAll();
- extensions::InstalledLoader(this).LoadAllExtensions();
+ bool load_saved_extensions = true;
+#if defined(OS_CHROMEOS)
+ if (chromeos::ProfileHelper::IsSigninProfile(profile_))
+ load_saved_extensions = false;
+#endif
+ if (load_saved_extensions) {
+ extensions::InstalledLoader(this).LoadAllExtensions();
+ } else {
+ // InstalledLoader::LoadAllExtensions normally calls
+ // OnLoadedInstalledExtensions itself, but here we circumvent that path.
+ // Call OnLoadedInstalledExtensions directly.
+ // TODO(devlin): LoadInstalledExtensions() is synchronous - we can simplify
+ // this.
+ OnLoadedInstalledExtensions();
+ }
LoadExtensionsFromCommandLineFlag(switches::kDisableExtensionsExcept);
if (extensions_enabled_)
LoadExtensionsFromCommandLineFlag(switches::kLoadExtension);
« no previous file with comments | « chrome/browser/extensions/chrome_process_manager_delegate.cc ('k') | chrome/browser/extensions/external_provider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698