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

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

Issue 1075273002: Handle ListAccount fetches from within the GaiaCookieManagerService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a test post rebase 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
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | components/signin/core/browser/about_signin_internals.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/signin/core/browser/about_signin_internals.h
diff --git a/components/signin/core/browser/about_signin_internals.h b/components/signin/core/browser/about_signin_internals.h
index e5850d1056c7caa288d66d464a588a46c74ef5b4..a2c1d23ecbc56b42bd6e49e05c9c72530e4fc568 100644
--- a/components/signin/core/browser/about_signin_internals.h
+++ b/components/signin/core/browser/about_signin_internals.h
@@ -13,11 +13,11 @@
#include "base/observer_list.h"
#include "base/values.h"
#include "components/keyed_service/core/keyed_service.h"
+#include "components/signin/core/browser/gaia_cookie_manager_service.h"
#include "components/signin/core/browser/signin_client.h"
#include "components/signin/core/browser/signin_error_controller.h"
#include "components/signin/core/browser/signin_internals_util.h"
#include "components/signin/core/browser/signin_manager.h"
-#include "google_apis/gaia/gaia_auth_consumer.h"
#include "google_apis/gaia/oauth2_token_service.h"
class AccountTrackerService;
@@ -35,7 +35,7 @@ class AboutSigninInternals
: public KeyedService,
public signin_internals_util::SigninDiagnosticsObserver,
public OAuth2TokenService::DiagnosticsObserver,
- public GaiaAuthConsumer,
+ public GaiaCookieManagerService::Observer,
SigninManagerBase::Observer,
SigninErrorController::Observer {
public:
@@ -52,7 +52,8 @@ class AboutSigninInternals
AboutSigninInternals(ProfileOAuth2TokenService* token_service,
AccountTrackerService* account_tracker,
SigninManagerBase* signin_manager,
- SigninErrorController* signin_error_controller);
+ SigninErrorController* signin_error_controller,
+ GaiaCookieManagerService* cookie_manager_service);
~AboutSigninInternals() override;
// Each instance of SigninInternalsUI adds itself as an observer to be
@@ -87,9 +88,10 @@ class AboutSigninInternals
// }
scoped_ptr<base::DictionaryValue> GetSigninStatus();
- // Triggers a ListAccounts call to acquire a list of the email addresses
- // corresponding to the cookies residing on the current cookie jar.
- void GetCookieAccountsAsync();
+ // GaiaCookieManagerService::Observer implementations.
+ void OnGaiaAccountsInCookieUpdated(
+ const std::vector<std::pair<std::string, bool> >& gaia_accounts,
+ const GoogleServiceAuthError& error) override;
private:
// Encapsulates diagnostic information about tokens for different services.
@@ -173,10 +175,6 @@ class AboutSigninInternals
void OnTokenRemoved(const std::string& account_id,
const OAuth2TokenService::ScopeSet& scopes) override;
- // GaiaAuthConsumer implementations.
- void OnListAccountsSuccess(const std::string& data) override;
- void OnListAccountsFailure(const GoogleServiceAuthError& error) override;
-
// SigninManagerBase::Observer implementations.
void GoogleSigninFailed(const GoogleServiceAuthError& error) override;
void GoogleSigninSucceeded(const std::string& account_id,
@@ -187,15 +185,6 @@ class AboutSigninInternals
void NotifyObservers();
- // Callback for ListAccounts. Once the email addresses are fetched from GAIA,
- // they are pushed to the signin_internals_ui.
- void OnListAccountsComplete(
- std::vector<std::pair<std::string, bool> >& gaia_accounts);
-
- // Called when a cookie changes. If the cookie relates to a GAIA LSID cookie,
- // then we call ListAccounts and update the UI element.
- void OnCookieChanged(const net::CanonicalCookie& cookie, bool removed);
-
// SigninErrorController::Observer implementation
void OnErrorChanged() override;
@@ -214,8 +203,8 @@ class AboutSigninInternals
// Weak pointer to the SigninErrorController
SigninErrorController* signin_error_controller_;
- // Fetcher for information about accounts in the cookie jar from GAIA.
- scoped_ptr<GaiaAuthFetcher> gaia_fetcher_;
+ // Weak pointer to the GaiaCookieManagerService
+ GaiaCookieManagerService* cookie_manager_service_;
// Encapsulates the actual signin and token related values.
// Most of the values are mirrored in the prefs for persistence.
@@ -223,9 +212,6 @@ class AboutSigninInternals
ObserverList<Observer> signin_observers_;
- scoped_ptr<SigninClient::CookieChangedSubscription>
- cookie_changed_subscription_;
-
DISALLOW_COPY_AND_ASSIGN(AboutSigninInternals);
};
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | components/signin/core/browser/about_signin_internals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698