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

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

Issue 286213003: Make GCMProfileService own GCMDriver, instead of deriving from it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 6 years, 7 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_GCM_INVALIDATION_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_INVALIDATION_GCM_INVALIDATION_BRIDGE_H_
6 #define CHROME_BROWSER_INVALIDATION_GCM_INVALIDATION_BRIDGE_H_ 6 #define CHROME_BROWSER_INVALIDATION_GCM_INVALIDATION_BRIDGE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 19 matching lines...) Expand all
30 // needed for GCMNetworkChannel. GCMInvalidationBridge lives on UI thread while 30 // needed for GCMNetworkChannel. GCMInvalidationBridge lives on UI thread while
31 // Core lives on IO thread. Core implements GCMNetworkChannelDelegate and posts 31 // Core lives on IO thread. Core implements GCMNetworkChannelDelegate and posts
32 // all function calls to GCMInvalidationBridge which does actual work to perform 32 // all function calls to GCMInvalidationBridge which does actual work to perform
33 // them. 33 // them.
34 class GCMInvalidationBridge : public gcm::GCMAppHandler, 34 class GCMInvalidationBridge : public gcm::GCMAppHandler,
35 public OAuth2TokenService::Consumer, 35 public OAuth2TokenService::Consumer,
36 public base::NonThreadSafe { 36 public base::NonThreadSafe {
37 public: 37 public:
38 class Core; 38 class Core;
39 39
40 GCMInvalidationBridge(gcm::GCMDriver* gcm_service, 40 GCMInvalidationBridge(gcm::GCMDriver* gcm_driver,
41 IdentityProvider* identity_provider); 41 IdentityProvider* identity_provider);
42 virtual ~GCMInvalidationBridge(); 42 virtual ~GCMInvalidationBridge();
43 43
44 // OAuth2TokenService::Consumer implementation. 44 // OAuth2TokenService::Consumer implementation.
45 virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request, 45 virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request,
46 const std::string& access_token, 46 const std::string& access_token,
47 const base::Time& expiration_time) OVERRIDE; 47 const base::Time& expiration_time) OVERRIDE;
48 virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request, 48 virtual void OnGetTokenFailure(const OAuth2TokenService::Request* request,
49 const GoogleServiceAuthError& error) OVERRIDE; 49 const GoogleServiceAuthError& error) OVERRIDE;
50 50
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 bool subscribed_for_incoming_messages_; 93 bool subscribed_for_incoming_messages_;
94 94
95 base::WeakPtrFactory<GCMInvalidationBridge> weak_factory_; 95 base::WeakPtrFactory<GCMInvalidationBridge> weak_factory_;
96 96
97 DISALLOW_COPY_AND_ASSIGN(GCMInvalidationBridge); 97 DISALLOW_COPY_AND_ASSIGN(GCMInvalidationBridge);
98 }; 98 };
99 99
100 } // namespace invalidation 100 } // namespace invalidation
101 101
102 #endif // CHROME_BROWSER_INVALIDATION_GCM_INVALIDATION_BRIDGE_H_ 102 #endif // CHROME_BROWSER_INVALIDATION_GCM_INVALIDATION_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698