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

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

Issue 179843002: Make invalidations work for Chrome OS Kiosk Apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
(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 "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h"
12
13 class LoginUIService;
14 class Profile;
15 class ProfileOAuth2TokenService;
16 class SigninManagerBase;
17
18 namespace invalidation {
19
20 // An authentication provider implementation that's backed by
21 // ProfileOAuth2TokenService and SigninManager.
22 class ProfileInvalidationAuthProvider : public InvalidationAuthProvider,
23 public content::NotificationObserver {
24 public:
25 ProfileInvalidationAuthProvider(SigninManagerBase* signin_manager,
26 ProfileOAuth2TokenService* token_service,
27 LoginUIService* login_ui_service,
28 Profile* profile);
29 virtual ~ProfileInvalidationAuthProvider();
30
31 // InvalidationAuthProvider:
32 virtual std::string GetAccountId() OVERRIDE;
33 virtual OAuth2TokenService* GetTokenService() OVERRIDE;
34 virtual bool ShowLoginUI() OVERRIDE;
35
36 // content::NotificationObserver implementation.
37 virtual void Observe(int type,
38 const content::NotificationSource& source,
39 const content::NotificationDetails& details) OVERRIDE;
40
41 private:
42 SigninManagerBase* const signin_manager_;
43 ProfileOAuth2TokenService* const token_service_;
44 LoginUIService* const login_ui_service_;
45 Profile* const profile_;
46
47 content::NotificationRegistrar notification_registrar_;
48
49 DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationAuthProvider);
50 };
51
52 } // namespace invalidation
53
54 #endif // CHROME_BROWSER_INVALIDATION_PROFILE_INVALIDATION_AUTH_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698