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

Unified Diff: chrome/browser/policy/user_cloud_policy_manager.h

Issue 12220060: Load policy before signin completes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT. Created 7 years, 10 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/policy/user_cloud_policy_manager.h
diff --git a/chrome/browser/policy/user_cloud_policy_manager.h b/chrome/browser/policy/user_cloud_policy_manager.h
index 39acbdfc82e8870f19aae77e6d5dc7b05b7cea4c..8c4dbfbcc43688c1db278d4b69a4ae2358187499 100644
--- a/chrome/browser/policy/user_cloud_policy_manager.h
+++ b/chrome/browser/policy/user_cloud_policy_manager.h
@@ -32,7 +32,7 @@ class UserCloudPolicyManager : public CloudPolicyManager {
// |device_management_service| must stay valid until this object is deleted or
// DisconnectAndRemovePolicy() gets called. Virtual for mocking.
virtual void Connect(PrefService* local_state,
- DeviceManagementService* device_management_service);
+ scoped_ptr<CloudPolicyClient> client);
// Shuts down the UserCloudPolicyManager (removes and stops refreshing the
// cached cloud policy). This is typically called when a profile is being
@@ -44,9 +44,16 @@ class UserCloudPolicyManager : public CloudPolicyManager {
// Virtual for mocking.
virtual bool IsClientRegistered() const;
- // Register the CloudPolicyClient using the passed OAuth token.
+ // Register the CloudPolicyClient using the passed OAuth token. This contacts
+ // the DMServer to mint a new DMToken.
void RegisterClient(const std::string& access_token);
+ // Creates a CloudPolicyClient for this client. Used in situations where
+ // callers want to create a DMToken without actually initializing the
+ // profile's policy infrastructure.
+ static scoped_ptr<CloudPolicyClient> CreateCloudPolicyClient(
+ DeviceManagementService* device_management_service);
+
private:
// The profile this instance belongs to.
Profile* profile_;
« no previous file with comments | « chrome/browser/policy/cloud_policy_browsertest.cc ('k') | chrome/browser/policy/user_cloud_policy_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698