Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_AUTH_PROVIDER_H_ | |
| 6 #define CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_AUTH_PROVIDER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "chrome/browser/invalidation/invalidation_auth_provider.h" | |
| 10 #include "chrome/browser/signin/signin_manager_base.h" | |
| 11 #include "content/public/browser/notification_observer.h" | |
| 12 #include "content/public/browser/notification_registrar.h" | |
|
pavely
2014/03/07 23:43:29
Do you need to include notification_registrar.h?
Mattias Nissler (ping if slow)
2014/03/08 01:30:07
No, this are leftovers. Removed.
| |
| 13 | |
| 14 class LoginUIService; | |
| 15 class Profile; | |
|
pavely
2014/03/07 23:43:29
I think it will compile without Profile declaratio
Mattias Nissler (ping if slow)
2014/03/08 01:30:07
Done.
| |
| 16 class ProfileOAuth2TokenService; | |
| 17 class SigninManagerBase; | |
| 18 | |
| 19 namespace invalidation { | |
| 20 | |
| 21 // An authentication provider implementation that's backed by | |
| 22 // ProfileOAuth2TokenService and SigninManager. | |
| 23 class ProfileInvalidationAuthProvider : public InvalidationAuthProvider, | |
| 24 public SigninManagerBase::Observer { | |
| 25 public: | |
| 26 ProfileInvalidationAuthProvider(SigninManagerBase* signin_manager, | |
| 27 ProfileOAuth2TokenService* token_service, | |
| 28 LoginUIService* login_ui_service); | |
| 29 virtual ~ProfileInvalidationAuthProvider(); | |
| 30 | |
| 31 // InvalidationAuthProvider: | |
| 32 virtual std::string GetAccountId() OVERRIDE; | |
| 33 virtual OAuth2TokenService* GetTokenService() OVERRIDE; | |
| 34 virtual bool ShowLoginUI() OVERRIDE; | |
| 35 | |
| 36 // SigninManagerBase: | |
|
pavely
2014/03/07 23:43:29
// SigninManagerBase::Observer:
Mattias Nissler (ping if slow)
2014/03/08 01:30:07
Done.
| |
| 37 virtual void GoogleSignedOut(const std::string& username) OVERRIDE; | |
| 38 | |
| 39 private: | |
| 40 SigninManagerBase* const signin_manager_; | |
| 41 ProfileOAuth2TokenService* const token_service_; | |
| 42 LoginUIService* const login_ui_service_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationAuthProvider); | |
| 45 }; | |
| 46 | |
| 47 } // namespace invalidation | |
| 48 | |
| 49 #endif // CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_AUTH_PROVIDER_H_ | |
| OLD | NEW |