OLD | NEW |
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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/threading/non_thread_safe.h" | 9 #include "base/threading/non_thread_safe.h" |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "sync/notifier/invalidator_registrar.h" | 21 #include "sync/notifier/invalidator_registrar.h" |
22 | 22 |
23 class Profile; | 23 class Profile; |
24 class SigninManagerBase; | 24 class SigninManagerBase; |
25 | 25 |
26 namespace syncer { | 26 namespace syncer { |
27 class Invalidator; | 27 class Invalidator; |
28 } | 28 } |
29 | 29 |
30 namespace invalidation { | 30 namespace invalidation { |
| 31 class GCMInvalidationBridge; |
31 | 32 |
32 // This InvalidationService wraps the C++ Invalidation Client (TICL) library. | 33 // This InvalidationService wraps the C++ Invalidation Client (TICL) library. |
33 // It provides invalidations for desktop platforms (Win, Mac, Linux). | 34 // It provides invalidations for desktop platforms (Win, Mac, Linux). |
34 class TiclInvalidationService | 35 class TiclInvalidationService |
35 : public base::NonThreadSafe, | 36 : public base::NonThreadSafe, |
36 public InvalidationService, | 37 public InvalidationService, |
37 public content::NotificationObserver, | 38 public content::NotificationObserver, |
38 public OAuth2TokenService::Consumer, | 39 public OAuth2TokenService::Consumer, |
39 public OAuth2TokenService::Observer, | 40 public OAuth2TokenService::Observer, |
40 public syncer::InvalidationHandler { | 41 public syncer::InvalidationHandler { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // TiclInvalidationService needs to remember access token in order to | 123 // TiclInvalidationService needs to remember access token in order to |
123 // invalidate it with OAuth2TokenService. | 124 // invalidate it with OAuth2TokenService. |
124 std::string access_token_; | 125 std::string access_token_; |
125 | 126 |
126 // TiclInvalidationService needs to hold reference to access_token_request_ | 127 // TiclInvalidationService needs to hold reference to access_token_request_ |
127 // for the duration of request in order to receive callbacks. | 128 // for the duration of request in order to receive callbacks. |
128 scoped_ptr<OAuth2TokenService::Request> access_token_request_; | 129 scoped_ptr<OAuth2TokenService::Request> access_token_request_; |
129 base::OneShotTimer<TiclInvalidationService> request_access_token_retry_timer_; | 130 base::OneShotTimer<TiclInvalidationService> request_access_token_retry_timer_; |
130 net::BackoffEntry request_access_token_backoff_; | 131 net::BackoffEntry request_access_token_backoff_; |
131 | 132 |
| 133 scoped_ptr<GCMInvalidationBridge> gcm_invalidation_bridge_; |
| 134 |
132 // The invalidation logger object we use to record state changes | 135 // The invalidation logger object we use to record state changes |
133 // and invalidations. | 136 // and invalidations. |
134 InvalidationLogger logger_; | 137 InvalidationLogger logger_; |
135 | 138 |
136 DISALLOW_COPY_AND_ASSIGN(TiclInvalidationService); | 139 DISALLOW_COPY_AND_ASSIGN(TiclInvalidationService); |
137 }; | 140 }; |
138 | 141 |
139 } // namespace invalidation | 142 } // namespace invalidation |
140 | 143 |
141 #endif // CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_ | 144 #endif // CHROME_BROWSER_INVALIDATION_TICL_INVALIDATION_SERVICE_H_ |
OLD | NEW |