| 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 COMPONENTS_INVALIDATION_IMPL_INVALIDATION_SERVICE_ANDROID_H_ | 5 #ifndef COMPONENTS_INVALIDATION_IMPL_INVALIDATION_SERVICE_ANDROID_H_ |
| 6 #define COMPONENTS_INVALIDATION_IMPL_INVALIDATION_SERVICE_ANDROID_H_ | 6 #define COMPONENTS_INVALIDATION_IMPL_INVALIDATION_SERVICE_ANDROID_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 namespace invalidation { | 23 namespace invalidation { |
| 24 | 24 |
| 25 class InvalidationLogger; | 25 class InvalidationLogger; |
| 26 | 26 |
| 27 // This InvalidationService is used to deliver invalidations on Android. The | 27 // This InvalidationService is used to deliver invalidations on Android. The |
| 28 // Android operating system has its own mechanisms for delivering invalidations. | 28 // Android operating system has its own mechanisms for delivering invalidations. |
| 29 class InvalidationServiceAndroid | 29 class InvalidationServiceAndroid |
| 30 : public base::NonThreadSafe, | 30 : public base::NonThreadSafe, |
| 31 public InvalidationService { | 31 public InvalidationService { |
| 32 public: | 32 public: |
| 33 explicit InvalidationServiceAndroid( | 33 explicit InvalidationServiceAndroid(); |
| 34 const base::android::JavaRef<jobject>& context); | |
| 35 ~InvalidationServiceAndroid() override; | 34 ~InvalidationServiceAndroid() override; |
| 36 | 35 |
| 37 // InvalidationService implementation. | 36 // InvalidationService implementation. |
| 38 // | 37 // |
| 39 // Note that this implementation does not properly support Ack-tracking, | 38 // Note that this implementation does not properly support Ack-tracking, |
| 40 // fetching the invalidator state, or querying the client's ID. Support for | 39 // fetching the invalidator state, or querying the client's ID. Support for |
| 41 // exposing the client ID should be available soon; see crbug.com/172391. | 40 // exposing the client ID should be available soon; see crbug.com/172391. |
| 42 void RegisterInvalidationHandler( | 41 void RegisterInvalidationHandler( |
| 43 syncer::InvalidationHandler* handler) override; | 42 syncer::InvalidationHandler* handler) override; |
| 44 bool UpdateRegisteredInvalidationIds(syncer::InvalidationHandler* handler, | 43 bool UpdateRegisteredInvalidationIds(syncer::InvalidationHandler* handler, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // The invalidation logger object we use to record state changes | 86 // The invalidation logger object we use to record state changes |
| 88 // and invalidations. | 87 // and invalidations. |
| 89 InvalidationLogger logger_; | 88 InvalidationLogger logger_; |
| 90 | 89 |
| 91 DISALLOW_COPY_AND_ASSIGN(InvalidationServiceAndroid); | 90 DISALLOW_COPY_AND_ASSIGN(InvalidationServiceAndroid); |
| 92 }; | 91 }; |
| 93 | 92 |
| 94 } // namespace invalidation | 93 } // namespace invalidation |
| 95 | 94 |
| 96 #endif // COMPONENTS_INVALIDATION_IMPL_INVALIDATION_SERVICE_ANDROID_H_ | 95 #endif // COMPONENTS_INVALIDATION_IMPL_INVALIDATION_SERVICE_ANDROID_H_ |
| OLD | NEW |