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

Unified Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc

Issue 1109133004: Cleanup PolicyOAuth2TokenFetcher method signatures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@policy
Patch Set: Add safety DCHECKs Created 5 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/policy/user_cloud_policy_manager_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
index 35ca56d81fee14caa4a76447e5b6ec3abb4d8a02..91f65eeec8705fe806e14a745212c97437c243f2 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
@@ -292,11 +292,11 @@ void UserCloudPolicyManagerChromeOS::FetchPolicyOAuthToken() {
->user_context()
.GetRefreshToken();
if (!refresh_token.empty()) {
- token_fetcher_.reset(new PolicyOAuth2TokenFetcher(
- std::string(), g_browser_process->system_request_context(),
+ token_fetcher_.reset(new PolicyOAuth2TokenFetcher());
+ token_fetcher_->StartWithRefreshToken(
+ refresh_token, g_browser_process->system_request_context(),
base::Bind(&UserCloudPolicyManagerChromeOS::OnOAuth2PolicyTokenFetched,
- base::Unretained(this))));
- token_fetcher_->StartWithRefreshToken(refresh_token);
+ base::Unretained(this)));
return;
}
@@ -309,12 +309,11 @@ void UserCloudPolicyManagerChromeOS::FetchPolicyOAuthToken() {
return;
}
- token_fetcher_.reset(new PolicyOAuth2TokenFetcher(
- signin_context.get(),
- g_browser_process->system_request_context(),
+ token_fetcher_.reset(new PolicyOAuth2TokenFetcher());
+ token_fetcher_->StartWithSigninContext(
+ signin_context.get(), g_browser_process->system_request_context(),
base::Bind(&UserCloudPolicyManagerChromeOS::OnOAuth2PolicyTokenFetched,
- base::Unretained(this))));
- token_fetcher_->Start();
+ base::Unretained(this)));
}
void UserCloudPolicyManagerChromeOS::OnOAuth2PolicyTokenFetched(

Powered by Google App Engine
This is Rietveld 408576698