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

Unified Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 12676017: Adding policy support to the new network configuration stack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang errors. Created 7 years, 8 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/login/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 5fb93ecf2eb0e8a82925e9aeb8ccca97f3ea84fd..63e3d3553d917113b0797d660d92c33e50cbee4e 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -74,6 +74,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/pref_names.h"
+#include "chromeos/chromeos_switches.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h"
#include "content/public/browser/browser_thread.h"
@@ -131,7 +132,7 @@ class LoginUtilsImpl
// TODO(dzhioev): Disabled in tests for a while.
// TODO(dzhioev): Move prewarm out of LoginUtils.
if (g_browser_process &&
- !CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType)) {
+ !CommandLine::ForCurrentProcess()->HasSwitch(::switches::kTestType)) {
registrar_.Add(
this,
chrome::NOTIFICATION_PROFILE_URL_REQUEST_CONTEXT_GETTER_INITIALIZED,
@@ -437,14 +438,10 @@ void LoginUtilsImpl::InitProfilePreferences(Profile* user_profile) {
if (use_shared_proxies_pref->IsDefaultValue())
user_profile->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false);
- // Locally managed users do not have user policy initialized.
- if (!UserManager::Get()->IsLoggedInAsLocallyManagedUser()) {
- policy::NetworkConfigurationUpdater* network_configuration_updater =
- g_browser_process->browser_policy_connector()->
- GetNetworkConfigurationUpdater();
- if (network_configuration_updater)
- network_configuration_updater->OnUserPolicyInitialized();
- }
+ // Notify the network configuration updater that policies are initialized. If
+ // there is no policy, it will read an empty policy which is fine.
+ g_browser_process->browser_policy_connector()->
+ GetNetworkConfigurationUpdater()->OnUserPolicyInitialized();
RespectLocalePreference(user_profile);
}

Powered by Google App Engine
This is Rietveld 408576698