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

Unified Diff: chrome/browser/chromeos/arc/arc_auth_context.h

Issue 2864433003: [ARC] Add browser test of ArcAuthService (Closed)
Patch Set: Response to reviews Created 3 years, 7 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 | « no previous file | chrome/browser/chromeos/arc/arc_auth_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_auth_context.h
diff --git a/chrome/browser/chromeos/arc/arc_auth_context.h b/chrome/browser/chromeos/arc/arc_auth_context.h
index c0aee9cedc78a9d7766de409d19575c78891eeba..a3a7e2a00ba4490ef7b5089643e767a0bf74184e 100644
--- a/chrome/browser/chromeos/arc/arc_auth_context.h
+++ b/chrome/browser/chromeos/arc/arc_auth_context.h
@@ -60,6 +60,10 @@ class ArcAuthContext : public UbertokenConsumer,
void OnMergeSessionSuccess(const std::string& data) override;
void OnMergeSessionFailure(const GoogleServiceAuthError& error) override;
+ // Skips the merge session, instead calling the callback passed to |Prepare()|
+ // once the refresh token is available. Use only in testing.
+ void SkipMergeSessionForTesting() { skip_merge_session_for_testing_ = true; }
+
private:
void OnRefreshTokenTimeout();
@@ -71,6 +75,9 @@ class ArcAuthContext : public UbertokenConsumer,
std::string account_id_;
std::string full_account_id_;
+ // Whether the merge session should be skipped. Set to true only in testing.
+ bool skip_merge_session_for_testing_ = false;
+
// Owned by content::BrowserContent. Used to isolate cookies for auth server
// communication and shared with ARC OptIn UI platform app.
content::StoragePartition* storage_partition_ = nullptr;
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/arc_auth_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698