| Index: chrome/browser/signin/signin_tracker.h
|
| diff --git a/chrome/browser/signin/signin_tracker.h b/chrome/browser/signin/signin_tracker.h
|
| index 64bd8ab8a642490a8ca452a075ba0a6f43d8d7f8..986803831fa08530f2536e85d5111be9987c8ae3 100644
|
| --- a/chrome/browser/signin/signin_tracker.h
|
| +++ b/chrome/browser/signin/signin_tracker.h
|
| @@ -9,6 +9,7 @@
|
| #include "content/public/browser/notification_registrar.h"
|
| #include "content/public/browser/notification_types.h"
|
| #include "google_apis/gaia/google_service_auth_error.h"
|
| +#include "google_apis/gaia/oauth2_token_service.h"
|
|
|
| class Profile;
|
|
|
| @@ -16,11 +17,11 @@ class Profile;
|
| // responsibilities:
|
| //
|
| // SigninTracker (this class) - This class listens to notifications from various
|
| -// services (SigninManager, tokenService, etc) and coalesces them into
|
| +// services (SigninManager, OAuth2TokenService) and coalesces them into
|
| // notifications for the UI layer. This is the class that encapsulates the logic
|
| // that determines whether a user is fully logged in or not, and exposes
|
| -// callbacks so various pieces of the UI (OneClickSyncStarter, SyncSetupHandler)
|
| -// can track the current startup state.
|
| +// callbacks so various pieces of the UI (OneClickSyncStarter) can track the
|
| +// current startup state.
|
| //
|
| // SyncSetupHandler - This class is primarily responsible for interacting with
|
| // the web UI for performing system login and sync configuration. Receives
|
| @@ -41,11 +42,15 @@ class Profile;
|
| // TokenService - Uses credentials provided by SigninManager to generate tokens
|
| // for all signed-in services in Chrome.
|
| //
|
| +// OAuth2TokenService - Maintains and manages OAuth2 tokens for the accounts
|
| +// connected to this profile.
|
| +//
|
| // ProfileSyncService - Provides the external API for interacting with the
|
| // sync framework. Listens for notifications from the TokenService to know
|
| // when to startup sync, and provides an Observer interface to notify the UI
|
| // layer of changes in sync state so they can be reflected in the UI.
|
| -class SigninTracker : public content::NotificationObserver {
|
| +class SigninTracker : public content::NotificationObserver,
|
| + public OAuth2TokenService::Observer {
|
| public:
|
| class Observer {
|
| public:
|
| @@ -74,6 +79,10 @@ class SigninTracker : public content::NotificationObserver {
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) OVERRIDE;
|
|
|
| + // OAuth2TokenService::Observer implementation.
|
| + virtual void OnRefreshTokenAvailable(const std::string& account_id) OVERRIDE;
|
| + virtual void OnRefreshTokenRevoked(const std::string& account_id) OVERRIDE;
|
| +
|
| // Returns true if the tokens are loaded for all signed-in services.
|
| static bool AreServiceTokensLoaded(Profile* profile);
|
|
|
|
|