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

Unified Diff: components/signin/core/browser/gaia_cookie_manager_service.h

Issue 1070563004: GCMS has automatic checks for CheckExternalConnections. It will be (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: AccountReconcilor tests need a fake list_accounts response, not a fake check_cc_results response. 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: components/signin/core/browser/gaia_cookie_manager_service.h
diff --git a/components/signin/core/browser/gaia_cookie_manager_service.h b/components/signin/core/browser/gaia_cookie_manager_service.h
index c288f44844cca70e02b7d9b04c6e9b18fc8f9f12..ff9d4b0a07212f90dfaa94bd0cd66aae29008472 100644
--- a/components/signin/core/browser/gaia_cookie_manager_service.h
+++ b/components/signin/core/browser/gaia_cookie_manager_service.h
@@ -87,13 +87,6 @@ class GaiaCookieManagerService : public KeyedService,
const std::string& account_id,
const GoogleServiceAuthError& error) = 0;
- // Called when ExternalCcResultFetcher completes. From this moment
- // forward calls to AddAccountToCookie() will use the result in merge
- // session calls. If |succeeded| is false, not all connections were checked,
- // but some may have been. AddAccountToCookie() will proceed with whatever
- // partial results were retrieved.
- virtual void GetCheckConnectionInfoCompleted(bool succeeded) {}
-
protected:
virtual ~Observer() {}
};
@@ -147,15 +140,16 @@ class GaiaCookieManagerService : public KeyedService,
void CleanupTransientState();
- void FireGetCheckConnectionInfoCompleted(bool succeeded);
+ void GetCheckConnectionInfoCompleted(bool succeeded);
GaiaCookieManagerService* helper_;
base::OneShotTimer<ExternalCcResultFetcher> timer_;
- scoped_ptr<GaiaAuthFetcher> gaia_auth_fetcher_;
URLToTokenAndFetcher fetchers_;
ResultMap results_;
base::Time m_external_cc_result_start_time_;
+ base::OneShotTimer<ExternalCcResultFetcher> gaia_auth_fetcher_timer_;
+
DISALLOW_COPY_AND_ASSIGN(ExternalCcResultFetcher);
};
@@ -187,9 +181,10 @@ class GaiaCookieManagerService : public KeyedService,
// Returns true of there are pending log ins or outs.
bool is_running() const { return requests_.size() > 0; }
- // Start the process of fetching the external check connection result so that
- // its ready when we try to perform a merge session.
- void StartFetchingExternalCcResult();
+ // Access the internal object during tests.
+ ExternalCcResultFetcher* external_cc_result_fetcher_for_testing() {
+ return &external_cc_result_fetcher_;
+ }
private:
net::URLRequestContextGetter* request_context() {
@@ -246,6 +241,9 @@ class GaiaCookieManagerService : public KeyedService,
// Source to use with GAIA endpoints for accounting.
std::string source_;
+ // True once the ExternalCCResultFetcher has completed once.
+ bool external_cc_result_fetched_;
+
DISALLOW_COPY_AND_ASSIGN(GaiaCookieManagerService);
};
« no previous file with comments | « components/signin/core/browser/account_reconcilor.cc ('k') | components/signin/core/browser/gaia_cookie_manager_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698