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

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

Issue 2864433003: [ARC] Add browser test of ArcAuthService (Closed)
Patch Set: Rebase 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
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..b7fc298f8582ecac85f95e3e931954236167cb29 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_;
Luis Héctor Chávez 2017/05/11 16:57:54 nit: we tend to prefer to initialize POD types in
blundell 2017/05/12 09:09:32 Done.
+
// 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;

Powered by Google App Engine
This is Rietveld 408576698