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

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

Issue 2945023002: Introduce profile for lock screen apps (Closed)
Patch Set: rebase Created 3 years, 6 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_system_impl.cc
diff --git a/chrome/browser/extensions/extension_system_impl.cc b/chrome/browser/extensions/extension_system_impl.cc
index 251b8a2089ba8b4192af08917806798c8745768e..455d90043076c9c3289b7ca3cad71f5b0a6c8422 100644
--- a/chrome/browser/extensions/extension_system_impl.cc
+++ b/chrome/browser/extensions/extension_system_impl.cc
@@ -208,8 +208,10 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {
bool autoupdate_enabled = !profile_->IsGuestSession() &&
!profile_->IsSystemProfile();
#if defined(OS_CHROMEOS)
- if (!extensions_enabled)
+ if (!extensions_enabled ||
+ chromeos::ProfileHelper::IsLockScreenAppProfile(profile_)) {
autoupdate_enabled = false;
+ }
#endif // defined(OS_CHROMEOS)
extension_service_.reset(new ExtensionService(
profile_, base::CommandLine::ForCurrentProcess(),
@@ -232,7 +234,10 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {
if (mode >= ContentVerifierDelegate::BOOTSTRAP)
content_verifier_->Start();
info_map()->SetContentVerifier(content_verifier_.get());
-
+#if defined(OS_CHROMEOS)
+ if (chromeos::ProfileHelper::IsLockScreenAppProfile(profile_))
+ info_map()->SetIsLockScreenContext(true);
+#endif
management_policy_.reset(new ManagementPolicy);
RegisterManagementPolicyProviders();
}
@@ -244,9 +249,12 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {
bool skip_session_extensions = false;
#if defined(OS_CHROMEOS)
// Skip loading session extensions if we are not in a user session or if the
- // profile is the sign-in profile, which doesn't correspond to a user session.
- skip_session_extensions = !chromeos::LoginState::Get()->IsUserLoggedIn() ||
- chromeos::ProfileHelper::IsSigninProfile(profile_);
+ // profile is the sign-in or lock screen app profile, which don't correspond
+ // to a user session.
+ skip_session_extensions =
+ !chromeos::LoginState::Get()->IsUserLoggedIn() ||
+ chromeos::ProfileHelper::IsSigninProfile(profile_) ||
+ chromeos::ProfileHelper::IsLockScreenAppProfile(profile_);
if (chrome::IsRunningInForcedAppMode()) {
extension_service_->component_loader()->
AddDefaultComponentExtensionsForKioskMode(skip_session_extensions);
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/metrics/chrome_metrics_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698