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

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

Issue 327243003: Introduce ProfileInvalidationProvider wrapper for InvalidationService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_TICL_INVALIDATION_SERVICE_H_ 5 #ifndef CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_
6 #define CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_ 6 #define CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 scoped_ptr<IdentityProvider> identity_provider, 63 scoped_ptr<IdentityProvider> identity_provider,
64 scoped_ptr<TiclSettingsProvider> settings_provider, 64 scoped_ptr<TiclSettingsProvider> settings_provider,
65 gcm::GCMDriver* gcm_driver, 65 gcm::GCMDriver* gcm_driver,
66 const scoped_refptr<net::URLRequestContextGetter>& request_context); 66 const scoped_refptr<net::URLRequestContextGetter>& request_context);
67 virtual ~TiclInvalidationService(); 67 virtual ~TiclInvalidationService();
68 68
69 void Init( 69 void Init(
70 scoped_ptr<syncer::InvalidationStateTracker> invalidation_state_tracker); 70 scoped_ptr<syncer::InvalidationStateTracker> invalidation_state_tracker);
71 71
72 // InvalidationService implementation. 72 // InvalidationService implementation.
73 // It is an error to have registered handlers when Shutdown() is called. 73 // It is an error to have registered handlers when the service is destroyed.
74 virtual void RegisterInvalidationHandler( 74 virtual void RegisterInvalidationHandler(
75 syncer::InvalidationHandler* handler) OVERRIDE; 75 syncer::InvalidationHandler* handler) OVERRIDE;
76 virtual void UpdateRegisteredInvalidationIds( 76 virtual void UpdateRegisteredInvalidationIds(
77 syncer::InvalidationHandler* handler, 77 syncer::InvalidationHandler* handler,
78 const syncer::ObjectIdSet& ids) OVERRIDE; 78 const syncer::ObjectIdSet& ids) OVERRIDE;
79 virtual void UnregisterInvalidationHandler( 79 virtual void UnregisterInvalidationHandler(
80 syncer::InvalidationHandler* handler) OVERRIDE; 80 syncer::InvalidationHandler* handler) OVERRIDE;
81 virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE; 81 virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE;
82 virtual std::string GetInvalidatorClientId() const OVERRIDE; 82 virtual std::string GetInvalidatorClientId() const OVERRIDE;
83 virtual InvalidationLogger* GetInvalidationLogger() OVERRIDE; 83 virtual InvalidationLogger* GetInvalidationLogger() OVERRIDE;
(...skipping 22 matching lines...) Expand all
106 // TiclSettingsProvider::Observer implementation. 106 // TiclSettingsProvider::Observer implementation.
107 virtual void OnUseGCMChannelChanged() OVERRIDE; 107 virtual void OnUseGCMChannelChanged() OVERRIDE;
108 108
109 // syncer::InvalidationHandler implementation. 109 // syncer::InvalidationHandler implementation.
110 virtual void OnInvalidatorStateChange( 110 virtual void OnInvalidatorStateChange(
111 syncer::InvalidatorState state) OVERRIDE; 111 syncer::InvalidatorState state) OVERRIDE;
112 virtual void OnIncomingInvalidation( 112 virtual void OnIncomingInvalidation(
113 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; 113 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE;
114 virtual std::string GetOwnerName() const OVERRIDE; 114 virtual std::string GetOwnerName() const OVERRIDE;
115 115
116 // Overrides KeyedService method.
117 virtual void Shutdown() OVERRIDE;
118
119 protected: 116 protected:
120 // Initializes with an injected invalidator. 117 // Initializes with an injected invalidator.
121 void InitForTest( 118 void InitForTest(
122 scoped_ptr<syncer::InvalidationStateTracker> invalidation_state_tracker, 119 scoped_ptr<syncer::InvalidationStateTracker> invalidation_state_tracker,
123 syncer::Invalidator* invalidator); 120 syncer::Invalidator* invalidator);
124 121
125 private: 122 private:
126 friend class TiclInvalidationServiceTestDelegate; 123 friend class TiclInvalidationServiceTestDelegate;
127 friend class TiclProfileSettingsProviderTest; 124 friend class TiclProfileSettingsProviderTest;
128 125
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 // Keep a copy of the important parameters used in network channel creation 160 // Keep a copy of the important parameters used in network channel creation
164 // for debugging. 161 // for debugging.
165 base::DictionaryValue network_channel_options_; 162 base::DictionaryValue network_channel_options_;
166 163
167 DISALLOW_COPY_AND_ASSIGN(TiclInvalidationService); 164 DISALLOW_COPY_AND_ASSIGN(TiclInvalidationService);
168 }; 165 };
169 166
170 } // namespace invalidation 167 } // namespace invalidation
171 168
172 #endif // CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_ 169 #endif // CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698