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

Unified Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 11444029: Added UserPolicySigninService::FetchPolicyForSignedInUser(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review feedback Created 8 years 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
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.h ('k') | chrome/browser/policy/cloud_policy_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/browser_policy_connector.cc
diff --git a/chrome/browser/policy/browser_policy_connector.cc b/chrome/browser/policy/browser_policy_connector.cc
index 780c62154dce1ec958df1c45b96320886c1abe1e..8a2fb94b6c47fd92f870b811e0e1f2aebf7d98f7 100644
--- a/chrome/browser/policy/browser_policy_connector.cc
+++ b/chrome/browser/policy/browser_policy_connector.cc
@@ -116,8 +116,10 @@ void BrowserPolicyConnector::Init() {
DCHECK(!is_initialized()) << "BrowserPolicyConnector::Init() called twice.";
platform_provider_.reset(CreatePlatformProvider());
- device_management_service_.reset(
- new DeviceManagementService(GetDeviceManagementUrl()));
+ if (!device_management_service_.get()) {
+ device_management_service_.reset(
+ new DeviceManagementService(GetDeviceManagementUrl()));
+ }
#if defined(OS_CHROMEOS)
chromeos::CryptohomeLibrary* cryptohome =
@@ -513,6 +515,11 @@ NetworkConfigurationUpdater*
#endif
}
+void BrowserPolicyConnector::SetDeviceManagementServiceForTesting(
+ scoped_ptr<DeviceManagementService> service) {
+ device_management_service_ = service.Pass();
+}
+
// static
void BrowserPolicyConnector::SetPolicyProviderForTesting(
ConfigurationPolicyProvider* provider) {
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.h ('k') | chrome/browser/policy/cloud_policy_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698