Index: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h |
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h |
index fdc7766d61e9098977631243f9e95a7e758f68b8..2b970a65cc03866dcff98859ebadf3d45de1f253 100644 |
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h |
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h |
@@ -57,6 +57,7 @@ class UserCloudPolicyManagerChromeOS : public CloudPolicyManager, |
scoped_ptr<CloudExternalDataManager> external_data_manager, |
const base::FilePath& component_policy_cache_path, |
bool wait_for_policy_fetch, |
+ const std::string& refresh_token, |
base::TimeDelta initial_policy_fetch_timeout, |
const scoped_refptr<base::SequencedTaskRunner>& task_runner, |
const scoped_refptr<base::SequencedTaskRunner>& file_task_runner, |
@@ -109,9 +110,10 @@ class UserCloudPolicyManagerChromeOS : public CloudPolicyManager, |
void GetChromePolicy(PolicyMap* policy_map) override; |
private: |
- // Fetches a policy token using the authentication context of the signin |
- // context, and calls back to OnOAuth2PolicyTokenFetched when done. |
- void FetchPolicyOAuthTokenUsingSigninContext(); |
+ // Fetches a policy token using the refresh token if available, or the |
+ // authentication context of the signin context, and calls back |
+ // OnOAuth2PolicyTokenFetched when done. |
+ void FetchPolicyOAuthToken(); |
// Called once the policy access token is available, and starts the |
// registration with the policy server if the token was successfully fetched. |
@@ -150,6 +152,9 @@ class UserCloudPolicyManagerChromeOS : public CloudPolicyManager, |
// IsInitializationComplete(). |
bool wait_for_policy_fetch_; |
+ // OAuth refresh token for fetching policy. |
+ std::string refresh_token_; |
+ |
// A timer that puts a hard limit on the maximum time to wait for the initial |
// policy fetch. |
base::Timer policy_fetch_timeout_; |