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

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

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.cc
diff --git a/chrome/browser/chromeos/arc/arc_auth_context.cc b/chrome/browser/chromeos/arc/arc_auth_context.cc
index 99d78b3e6723b584ed0d6a8b4920df17935194b2..b8d6a0dfca1e11e6eb27f0554d220a435c1bd2e6 100644
--- a/chrome/browser/chromeos/arc/arc_auth_context.cc
+++ b/chrome/browser/chromeos/arc/arc_auth_context.cc
@@ -29,7 +29,8 @@ constexpr base::TimeDelta kRefreshTokenTimeout =
} // namespace
-ArcAuthContext::ArcAuthContext(Profile* profile) {
+ArcAuthContext::ArcAuthContext(Profile* profile)
+ : skip_merge_session_for_testing_(false) {
// Reuse storage used in ARC OptIn platform app.
const std::string site_url = base::StringPrintf(
"%s://%s/persist?%s", content::kGuestScheme, ArcSupportHost::kHostAppId,
@@ -94,6 +95,12 @@ void ArcAuthContext::OnRefreshTokenTimeout() {
void ArcAuthContext::StartFetchers() {
DCHECK(!refresh_token_timeout_.IsRunning());
ResetFetchers();
+
+ if (skip_merge_session_for_testing_) {
+ OnMergeSessionSuccess("");
+ return;
+ }
+
ubertoken_fetcher_.reset(
new UbertokenFetcher(token_service_, this, GaiaConstants::kChromeOSSource,
storage_partition_->GetURLRequestContext()));

Powered by Google App Engine
This is Rietveld 408576698