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

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: Remove policy initialized flags and wrap PolicyMaps with scoped_ptr. 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 2feb04c21c0f9c7234a8bcff381e621c018d0756..08ce5246246c21e656cbec84efd92211b1fad86a 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -47,6 +47,7 @@
#include "chrome/browser/chromeos/net/connectivity_state_helper.h"
#include "chrome/browser/chromeos/net/connectivity_state_helper_observer.h"
#include "chrome/browser/chromeos/policy/network_configuration_updater.h"
+#include "chrome/browser/chromeos/policy/network_configuration_updater2.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/chromeos/settings/cros_settings_names.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -73,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"
@@ -427,11 +429,17 @@ void LoginUtilsImpl::InitProfilePreferences(Profile* user_profile) {
// 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();
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUseNewNetworkConfigurationHandlers)) {
+ g_browser_process->browser_policy_connector()->
+ GetNetworkConfigurationUpdater2()->OnUserPolicyInitialized();
+ } else {
+ policy::NetworkConfigurationUpdater* network_configuration_updater =
+ g_browser_process->browser_policy_connector()->
+ GetNetworkConfigurationUpdater();
+ if (network_configuration_updater)
+ network_configuration_updater->OnUserPolicyInitialized();
+ }
}
RespectLocalePreference(user_profile);

Powered by Google App Engine
This is Rietveld 408576698