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

Side by Side Diff: google_apis/gaia/dummy_identity_provider.h

Issue 301973009: Add browser-global GCMDriver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build on Android. Created 6 years, 6 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
« no previous file with comments | « google_apis/BUILD.gn ('k') | google_apis/gaia/dummy_identity_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef GOOGLE_APIS_GAIA_DUMMY_IDENTITY_PROVIDER_H_
6 #define GOOGLE_APIS_GAIA_DUMMY_IDENTITY_PROVIDER_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "google_apis/gaia/identity_provider.h"
12
13 // GCMDriverDesktop depends on IdentityProvider as it was originally meant to
14 // work for signed-in users only. This dependency is being removed. While it is
15 // still present, DummyIdentityProvider will be used for the browser-global
16 // GCMDriver instance. The DummyIdentityProvider never has any active user or
17 // tokens.
18 // TODO(bartfab,jianli): Remove this class when GCMDriverDesktop no longer
19 // depends on IdentityService.
20 class DummyIdentityProvider : public IdentityProvider {
21 public:
22 DummyIdentityProvider();
23 virtual ~DummyIdentityProvider();
24
25 // IdentityProvider:
26 virtual std::string GetActiveUsername() OVERRIDE;
27 virtual std::string GetActiveAccountId() OVERRIDE;
28 virtual OAuth2TokenService* GetTokenService() OVERRIDE;
29 virtual bool RequestLogin() OVERRIDE;
30
31 private:
32 class DummyOAuth2TokenService;
33
34 scoped_ptr<DummyOAuth2TokenService> oauth2_token_service_;
35
36 DISALLOW_COPY_AND_ASSIGN(DummyIdentityProvider);
37 };
38
39 #endif // GOOGLE_APIS_GAIA_FAKE_IDENTITY_PROVIDER_H_
OLDNEW
« no previous file with comments | « google_apis/BUILD.gn ('k') | google_apis/gaia/dummy_identity_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698