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