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

Unified Diff: chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h

Issue 1108983002: Fetch policy with refresh token. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment and unit test 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/policy_oauth2_token_fetcher.h
diff --git a/chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h b/chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h
index af2671afc0090a0bbc314baef88e46b66cca4ba5..61829485df3b372d20621ae1252c721886814204 100644
--- a/chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h
+++ b/chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h
@@ -53,6 +53,10 @@ class PolicyOAuth2TokenFetcher
// Starts process of minting device management service OAuth2 access token.
void Start();
+ // Starts minting device management service OAuth2 access token with the given
+ // |oauth2_refresh_token|.
+ void StartWithRefreshToken(const std::string& oauth2_refresh_token);
Mattias Nissler (ping if slow) 2015/04/28 06:50:43 Please turn this into a 3rd constructor for consis
achuithb 2015/04/28 18:20:08 I considered this. The first problem is that the t
Mattias Nissler (ping if slow) 2015/04/29 07:10:52 That's a good point.
+
// Returns true if we have previously attempted to fetch tokens with this
// class and failed.
bool failed() const {
@@ -110,10 +114,10 @@ class PolicyOAuth2TokenFetcher
std::string oauth2_access_token_;
// The retry counter. Increment this only when failure happened.
- int retry_count_;
+ int retry_count_ = 0;
// True if we have already failed to fetch the policy.
- bool failed_;
+ bool failed_ = false;
// The callback to invoke when done.
TokenCallback callback_;

Powered by Google App Engine
This is Rietveld 408576698