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

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

Issue 1108983002: Fetch policy with refresh token. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix user_cloud_policy_manager_chromeos_unittest 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
« no previous file with comments | « chrome/browser/chromeos/policy/wildcard_login_checker.h ('k') | chromeos/login/auth/login_performer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 169222a51096d980f2263cd5acf243327b0da994..57f8597510c00dbbf5315772882e0f77a9575cbc 100644
--- a/chrome/browser/chromeos/policy/wildcard_login_checker.cc
+++ b/chrome/browser/chromeos/policy/wildcard_login_checker.cc
@@ -51,6 +51,22 @@ void WildcardLoginChecker::Start(
token_fetcher_->Start();
}
+void WildcardLoginChecker::StartWithRefreshToken(
+ const std::string& refresh_token,
+ const StatusCallback& callback) {
+ CHECK(!token_fetcher_);
+ CHECK(!user_info_fetcher_);
+
+ start_timestamp_ = base::Time::Now();
+
+ callback_ = callback;
+ token_fetcher_.reset(new PolicyOAuth2TokenFetcher(
+ std::string(), g_browser_process->system_request_context(),
+ base::Bind(&WildcardLoginChecker::OnPolicyTokenFetched,
+ base::Unretained(this))));
+ token_fetcher_->StartWithRefreshToken(refresh_token);
+}
+
void WildcardLoginChecker::StartWithAccessToken(
const std::string& access_token,
const StatusCallback& callback) {
« no previous file with comments | « chrome/browser/chromeos/policy/wildcard_login_checker.h ('k') | chromeos/login/auth/login_performer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698