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

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

Issue 1767443002: Add enterprise enrollment support for fake users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 10 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 a0d020b5b66e41739b05e979f25db534b09c077d..9c5c331cf308bde14f513d01f9a77b5a2147ff73 100644
--- a/chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h
+++ b/chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h
@@ -68,6 +68,9 @@ class PolicyOAuth2TokenFetcher
return oauth2_access_token_;
}
+ // Causes fake tokens to be returned so no network calls are made.
+ static void EnableFakeForTesting();
+
private:
// GaiaAuthConsumer overrides.
void OnClientOAuthSuccess(
@@ -96,6 +99,10 @@ class PolicyOAuth2TokenFetcher
void ForwardPolicyToken(const std::string& token,
const GoogleServiceAuthError& error);
+ // If true, fake policy tokens will be sent instead of making network
+ // requests.
+ static bool enable_fake_for_testing_;
+
// Auth code which is used to retreive a refresh token.
std::string auth_code_;

Powered by Google App Engine
This is Rietveld 408576698