OLD | NEW |
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 COMPONENTS_INVALIDATION_TICL_INVALIDATION_SERVICE_H_ | 5 #ifndef COMPONENTS_INVALIDATION_TICL_INVALIDATION_SERVICE_H_ |
6 #define COMPONENTS_INVALIDATION_TICL_INVALIDATION_SERVICE_H_ | 6 #define COMPONENTS_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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 gcm::GCMDriver* gcm_driver, | 66 gcm::GCMDriver* gcm_driver, |
67 const scoped_refptr<net::URLRequestContextGetter>& request_context); | 67 const scoped_refptr<net::URLRequestContextGetter>& request_context); |
68 virtual ~TiclInvalidationService(); | 68 virtual ~TiclInvalidationService(); |
69 | 69 |
70 void Init( | 70 void Init( |
71 scoped_ptr<syncer::InvalidationStateTracker> invalidation_state_tracker); | 71 scoped_ptr<syncer::InvalidationStateTracker> invalidation_state_tracker); |
72 | 72 |
73 // InvalidationService implementation. | 73 // InvalidationService implementation. |
74 // It is an error to have registered handlers when the service is destroyed. | 74 // It is an error to have registered handlers when the service is destroyed. |
75 virtual void RegisterInvalidationHandler( | 75 virtual void RegisterInvalidationHandler( |
76 syncer::InvalidationHandler* handler) OVERRIDE; | 76 syncer::InvalidationHandler* handler) override; |
77 virtual void UpdateRegisteredInvalidationIds( | 77 virtual void UpdateRegisteredInvalidationIds( |
78 syncer::InvalidationHandler* handler, | 78 syncer::InvalidationHandler* handler, |
79 const syncer::ObjectIdSet& ids) OVERRIDE; | 79 const syncer::ObjectIdSet& ids) override; |
80 virtual void UnregisterInvalidationHandler( | 80 virtual void UnregisterInvalidationHandler( |
81 syncer::InvalidationHandler* handler) OVERRIDE; | 81 syncer::InvalidationHandler* handler) override; |
82 virtual syncer::InvalidatorState GetInvalidatorState() const OVERRIDE; | 82 virtual syncer::InvalidatorState GetInvalidatorState() const override; |
83 virtual std::string GetInvalidatorClientId() const OVERRIDE; | 83 virtual std::string GetInvalidatorClientId() const override; |
84 virtual InvalidationLogger* GetInvalidationLogger() OVERRIDE; | 84 virtual InvalidationLogger* GetInvalidationLogger() override; |
85 virtual void RequestDetailedStatus( | 85 virtual void RequestDetailedStatus( |
86 base::Callback<void(const base::DictionaryValue&)> caller) const OVERRIDE; | 86 base::Callback<void(const base::DictionaryValue&)> caller) const override; |
87 virtual IdentityProvider* GetIdentityProvider() OVERRIDE; | 87 virtual IdentityProvider* GetIdentityProvider() override; |
88 | 88 |
89 void RequestAccessToken(); | 89 void RequestAccessToken(); |
90 | 90 |
91 // OAuth2TokenService::Consumer implementation | 91 // OAuth2TokenService::Consumer implementation |
92 virtual void OnGetTokenSuccess( | 92 virtual void OnGetTokenSuccess( |
93 const OAuth2TokenService::Request* request, | 93 const OAuth2TokenService::Request* request, |
94 const std::string& access_token, | 94 const std::string& access_token, |
95 const base::Time& expiration_time) OVERRIDE; | 95 const base::Time& expiration_time) override; |
96 virtual void OnGetTokenFailure( | 96 virtual void OnGetTokenFailure( |
97 const OAuth2TokenService::Request* request, | 97 const OAuth2TokenService::Request* request, |
98 const GoogleServiceAuthError& error) OVERRIDE; | 98 const GoogleServiceAuthError& error) override; |
99 | 99 |
100 // OAuth2TokenService::Observer implementation | 100 // OAuth2TokenService::Observer implementation |
101 virtual void OnRefreshTokenAvailable(const std::string& account_id) OVERRIDE; | 101 virtual void OnRefreshTokenAvailable(const std::string& account_id) override; |
102 virtual void OnRefreshTokenRevoked(const std::string& account_id) OVERRIDE; | 102 virtual void OnRefreshTokenRevoked(const std::string& account_id) override; |
103 | 103 |
104 // IdentityProvider::Observer implementation. | 104 // IdentityProvider::Observer implementation. |
105 virtual void OnActiveAccountLogout() OVERRIDE; | 105 virtual void OnActiveAccountLogout() override; |
106 | 106 |
107 // TiclSettingsProvider::Observer implementation. | 107 // TiclSettingsProvider::Observer implementation. |
108 virtual void OnUseGCMChannelChanged() OVERRIDE; | 108 virtual void OnUseGCMChannelChanged() override; |
109 | 109 |
110 // syncer::InvalidationHandler implementation. | 110 // syncer::InvalidationHandler implementation. |
111 virtual void OnInvalidatorStateChange( | 111 virtual void OnInvalidatorStateChange( |
112 syncer::InvalidatorState state) OVERRIDE; | 112 syncer::InvalidatorState state) override; |
113 virtual void OnIncomingInvalidation( | 113 virtual void OnIncomingInvalidation( |
114 const syncer::ObjectIdInvalidationMap& invalidation_map) OVERRIDE; | 114 const syncer::ObjectIdInvalidationMap& invalidation_map) override; |
115 virtual std::string GetOwnerName() const OVERRIDE; | 115 virtual std::string GetOwnerName() const override; |
116 | 116 |
117 protected: | 117 protected: |
118 // Initializes with an injected invalidator. | 118 // Initializes with an injected invalidator. |
119 void InitForTest( | 119 void InitForTest( |
120 scoped_ptr<syncer::InvalidationStateTracker> invalidation_state_tracker, | 120 scoped_ptr<syncer::InvalidationStateTracker> invalidation_state_tracker, |
121 syncer::Invalidator* invalidator); | 121 syncer::Invalidator* invalidator); |
122 | 122 |
123 private: | 123 private: |
124 friend class TiclInvalidationServiceTestDelegate; | 124 friend class TiclInvalidationServiceTestDelegate; |
125 friend class TiclProfileSettingsProviderTest; | 125 friend class TiclProfileSettingsProviderTest; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 // Keep a copy of the important parameters used in network channel creation | 163 // Keep a copy of the important parameters used in network channel creation |
164 // for debugging. | 164 // for debugging. |
165 base::DictionaryValue network_channel_options_; | 165 base::DictionaryValue network_channel_options_; |
166 | 166 |
167 DISALLOW_COPY_AND_ASSIGN(TiclInvalidationService); | 167 DISALLOW_COPY_AND_ASSIGN(TiclInvalidationService); |
168 }; | 168 }; |
169 | 169 |
170 } // namespace invalidation | 170 } // namespace invalidation |
171 | 171 |
172 #endif // COMPONENTS_INVALIDATION_TICL_INVALIDATION_SERVICE_H_ | 172 #endif // COMPONENTS_INVALIDATION_TICL_INVALIDATION_SERVICE_H_ |
OLD | NEW |