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

Unified Diff: chrome/browser/chromeos/policy/user_network_configuration_updater_factory.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/chromeos/policy/user_network_configuration_updater_factory.cc
diff --git a/chrome/browser/chromeos/policy/user_network_configuration_updater_factory.cc b/chrome/browser/chromeos/policy/user_network_configuration_updater_factory.cc
index 6ea318b4eb64f3a1b397830b107b35b7513788b4..f6258fb615c2b75ea4ba402d1331c0194d8e87bc 100644
--- a/chrome/browser/chromeos/policy/user_network_configuration_updater_factory.cc
+++ b/chrome/browser/chromeos/policy/user_network_configuration_updater_factory.cc
@@ -60,9 +60,12 @@ bool UserNetworkConfigurationUpdaterFactory::ServiceIsNULLWhileTesting() const {
KeyedService* UserNetworkConfigurationUpdaterFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
+ // On the login/lock screen only device network policies apply.
Profile* profile = Profile::FromBrowserContext(context);
- if (chromeos::ProfileHelper::IsSigninProfile(profile))
- return NULL; // On the login screen only device network policies apply.
+ if (chromeos::ProfileHelper::IsSigninProfile(profile) ||
+ chromeos::ProfileHelper::IsLockScreenAppProfile(profile)) {
+ return nullptr;
+ }
const user_manager::User* user =
chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
@@ -70,7 +73,7 @@ KeyedService* UserNetworkConfigurationUpdaterFactory::BuildServiceInstanceFor(
// Currently, only the network policy of the primary user is supported. See
// also http://crbug.com/310685 .
if (user != user_manager::UserManager::Get()->GetPrimaryUser())
- return NULL;
+ return nullptr;
ProfilePolicyConnector* profile_connector =
ProfilePolicyConnectorFactory::GetForBrowserContext(context);

Powered by Google App Engine
This is Rietveld 408576698