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

Side by Side Diff: chrome/browser/chromeos/policy/user_network_configuration_updater_factory.cc

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/policy/user_network_configuration_updater_fact ory.h" 5 #include "chrome/browser/chromeos/policy/user_network_configuration_updater_fact ory.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chrome/browser/chromeos/login/users/user.h" 8 #include "chrome/browser/chromeos/login/users/user.h"
9 #include "chrome/browser/chromeos/login/users/user_manager.h" 9 #include "chrome/browser/chromeos/login/users/user_manager.h"
10 #include "chrome/browser/chromeos/policy/user_network_configuration_updater.h" 10 #include "chrome/browser/chromeos/policy/user_network_configuration_updater.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 content::BrowserContext* context) const { 64 content::BrowserContext* context) const {
65 Profile* profile = static_cast<Profile*>(context); 65 Profile* profile = static_cast<Profile*>(context);
66 if (chromeos::ProfileHelper::IsSigninProfile(profile)) 66 if (chromeos::ProfileHelper::IsSigninProfile(profile))
67 return NULL; // On the login screen only device network policies apply. 67 return NULL; // On the login screen only device network policies apply.
68 68
69 chromeos::User* user = 69 chromeos::User* user =
70 chromeos::ProfileHelper::Get()->GetUserByProfile(profile); 70 chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
71 DCHECK(user); 71 DCHECK(user);
72 // Currently, only the network policy of the primary user is supported. See 72 // Currently, only the network policy of the primary user is supported. See
73 // also http://crbug.com/310685 . 73 // also http://crbug.com/310685 .
74 if (user != chromeos::UserManager::Get()->GetPrimaryUser()) 74 if (user != chromeos::GetUserManager()->GetPrimaryUser())
75 return NULL; 75 return NULL;
76 76
77 const bool allow_trusted_certs_from_policy = 77 const bool allow_trusted_certs_from_policy =
78 user->GetType() == user_manager::USER_TYPE_REGULAR; 78 user->GetType() == user_manager::USER_TYPE_REGULAR;
79 79
80 ProfilePolicyConnector* profile_connector = 80 ProfilePolicyConnector* profile_connector =
81 ProfilePolicyConnectorFactory::GetForProfile(profile); 81 ProfilePolicyConnectorFactory::GetForProfile(profile);
82 82
83 return UserNetworkConfigurationUpdater::CreateForUserPolicy( 83 return UserNetworkConfigurationUpdater::CreateForUserPolicy(
84 profile, 84 profile,
85 allow_trusted_certs_from_policy, 85 allow_trusted_certs_from_policy,
86 *user, 86 *user,
87 profile_connector->policy_service(), 87 profile_connector->policy_service(),
88 chromeos::NetworkHandler::Get()->managed_network_configuration_handler()) 88 chromeos::NetworkHandler::Get()->managed_network_configuration_handler())
89 .release(); 89 .release();
90 } 90 }
91 91
92 } // namespace policy 92 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698