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

Unified Diff: chrome/browser/chromeos/policy/wildcard_login_checker.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/wildcard_login_checker.cc
diff --git a/chrome/browser/chromeos/policy/wildcard_login_checker.cc b/chrome/browser/chromeos/policy/wildcard_login_checker.cc
index 57f8597510c00dbbf5315772882e0f77a9575cbc..ab398f3ef333b15874b3424e60becb9f668cdd0b 100644
--- a/chrome/browser/chromeos/policy/wildcard_login_checker.cc
+++ b/chrome/browser/chromeos/policy/wildcard_login_checker.cc
@@ -34,7 +34,7 @@ WildcardLoginChecker::WildcardLoginChecker() {}
WildcardLoginChecker::~WildcardLoginChecker() {}
-void WildcardLoginChecker::Start(
+void WildcardLoginChecker::StartWithSigninContext(
scoped_refptr<net::URLRequestContextGetter> signin_context,
const StatusCallback& callback) {
CHECK(!token_fetcher_);
@@ -43,12 +43,11 @@ void WildcardLoginChecker::Start(
start_timestamp_ = base::Time::Now();
callback_ = callback;
- 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(&WildcardLoginChecker::OnPolicyTokenFetched,
- base::Unretained(this))));
- token_fetcher_->Start();
+ base::Unretained(this)));
}
void WildcardLoginChecker::StartWithRefreshToken(
@@ -60,11 +59,11 @@ void WildcardLoginChecker::StartWithRefreshToken(
start_timestamp_ = base::Time::Now();
callback_ = callback;
- 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(&WildcardLoginChecker::OnPolicyTokenFetched,
- base::Unretained(this))));
- token_fetcher_->StartWithRefreshToken(refresh_token);
+ base::Unretained(this)));
}
void WildcardLoginChecker::StartWithAccessToken(

Powered by Google App Engine
This is Rietveld 408576698