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

Unified Diff: chrome/browser/chromeos/policy/user_network_configuration_updater_factory.cc

Issue 2945023002: Introduce profile for lock screen apps (Closed)
Patch Set: . 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..50e3fb5e45fff93b8263506f6e86b9f7feabf981 100644
--- a/chrome/browser/chromeos/policy/user_network_configuration_updater_factory.cc
+++ b/chrome/browser/chromeos/policy/user_network_configuration_updater_factory.cc
@@ -61,8 +61,10 @@ bool UserNetworkConfigurationUpdaterFactory::ServiceIsNULLWhileTesting() const {
KeyedService* UserNetworkConfigurationUpdaterFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
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; // On the login screen only device network policies apply.
emaxx 2017/06/23 16:16:30 nit: Replace "login screen" with "login/lock scree
tbarzic 2017/06/23 17:18:40 Done.
+ }
const user_manager::User* user =
chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
@@ -70,7 +72,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