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

Side by Side Diff: chrome/browser/invalidation/profile_invalidation_auth_provider.h

Issue 225403021: Extract Profile-independent GCMService from GCMProfileService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pass scoped_refptr as const reference. Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_AUTH_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_AUTH_PROVIDER_H_
6 #define CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_AUTH_PROVIDER_H_ 6 #define CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_AUTH_PROVIDER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/invalidation/invalidation_auth_provider.h" 9 #include "chrome/browser/invalidation/invalidation_auth_provider.h"
10 #include "components/signin/core/browser/signin_manager_base.h" 10 #include "components/signin/core/browser/signin_manager_base.h"
11 11
12 class LoginUIService; 12 class LoginUIService;
13 class ProfileOAuth2TokenService; 13 class ProfileOAuth2TokenService;
14 14
15 namespace invalidation { 15 namespace invalidation {
16 16
17 // An authentication provider implementation that's backed by 17 // An authentication provider implementation that's backed by
18 // ProfileOAuth2TokenService and SigninManager. 18 // ProfileOAuth2TokenService and SigninManager.
19 class ProfileInvalidationAuthProvider : public InvalidationAuthProvider, 19 class ProfileInvalidationAuthProvider : public InvalidationAuthProvider,
20 public SigninManagerBase::Observer { 20 public SigninManagerBase::Observer {
21 public: 21 public:
22 ProfileInvalidationAuthProvider(SigninManagerBase* signin_manager, 22 ProfileInvalidationAuthProvider(SigninManagerBase* signin_manager,
23 ProfileOAuth2TokenService* token_service, 23 ProfileOAuth2TokenService* token_service,
24 LoginUIService* login_ui_service); 24 LoginUIService* login_ui_service);
25 virtual ~ProfileInvalidationAuthProvider(); 25 virtual ~ProfileInvalidationAuthProvider();
26 26
27 // InvalidationAuthProvider: 27 // InvalidationAuthProvider:
28 virtual std::string GetUsername() OVERRIDE;
28 virtual std::string GetAccountId() OVERRIDE; 29 virtual std::string GetAccountId() OVERRIDE;
29 virtual OAuth2TokenService* GetTokenService() OVERRIDE; 30 virtual OAuth2TokenService* GetTokenService() OVERRIDE;
30 virtual bool ShowLoginUI() OVERRIDE; 31 virtual bool ShowLoginUI() OVERRIDE;
31 32
32 // SigninManagerBase::Observer: 33 // SigninManagerBase::Observer:
34 virtual void GoogleSigninSucceeded(const std::string& username,
35 const std::string& password) OVERRIDE;
33 virtual void GoogleSignedOut(const std::string& username) OVERRIDE; 36 virtual void GoogleSignedOut(const std::string& username) OVERRIDE;
34 37
35 private: 38 private:
36 SigninManagerBase* const signin_manager_; 39 SigninManagerBase* const signin_manager_;
37 ProfileOAuth2TokenService* const token_service_; 40 ProfileOAuth2TokenService* const token_service_;
38 LoginUIService* const login_ui_service_; 41 LoginUIService* const login_ui_service_;
39 42
40 DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationAuthProvider); 43 DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationAuthProvider);
41 }; 44 };
42 45
43 } // namespace invalidation 46 } // namespace invalidation
44 47
45 #endif // CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_AUTH_PROVIDER_H_ 48 #endif // CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_AUTH_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698