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 // An implementation of Invalidator that wraps an invalidation | 5 // An implementation of Invalidator that wraps an invalidation |
6 // client. Handles the details of connecting to XMPP and hooking it | 6 // client. Handles the details of connecting to XMPP and hooking it |
7 // up to the invalidation client. | 7 // up to the invalidation client. |
8 // | 8 // |
9 // You probably don't want to use this directly; use | 9 // You probably don't want to use this directly; use |
10 // NonBlockingInvalidator. | 10 // NonBlockingInvalidator. |
11 | 11 |
12 #ifndef COMPONENTS_INVALIDATION_IMPL_INVALIDATION_NOTIFIER_H_ | 12 #ifndef COMPONENTS_INVALIDATION_IMPL_INVALIDATION_NOTIFIER_H_ |
13 #define COMPONENTS_INVALIDATION_IMPL_INVALIDATION_NOTIFIER_H_ | 13 #define COMPONENTS_INVALIDATION_IMPL_INVALIDATION_NOTIFIER_H_ |
14 | 14 |
15 #include <memory> | 15 #include <memory> |
16 #include <string> | 16 #include <string> |
17 | 17 |
18 #include "base/compiler_specific.h" | 18 #include "base/compiler_specific.h" |
19 #include "base/macros.h" | 19 #include "base/macros.h" |
20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
21 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
22 #include "base/sequenced_task_runner.h" | 22 #include "base/sequenced_task_runner.h" |
23 #include "base/threading/non_thread_safe.h" | 23 #include "base/threading/non_thread_safe.h" |
24 #include "components/invalidation/impl/invalidation_state_tracker.h" | 24 #include "components/invalidation/impl/invalidation_state_tracker.h" |
25 #include "components/invalidation/impl/invalidator.h" | 25 #include "components/invalidation/impl/invalidator.h" |
26 #include "components/invalidation/impl/invalidator_registrar.h" | 26 #include "components/invalidation/impl/invalidator_registrar.h" |
27 #include "components/invalidation/impl/sync_invalidation_listener.h" | 27 #include "components/invalidation/impl/sync_invalidation_listener.h" |
28 #include "components/invalidation/public/invalidation_export.h" | 28 #include "components/invalidation/public/invalidation_export.h" |
29 | 29 |
30 namespace notifier { | |
31 class PushClient; | |
32 } // namespace notifier | |
33 | |
34 namespace syncer { | 30 namespace syncer { |
35 | 31 |
36 // This class must live on the IO thread. | 32 // This class must live on the IO thread. |
37 class INVALIDATION_EXPORT InvalidationNotifier | 33 class INVALIDATION_EXPORT InvalidationNotifier |
38 : public Invalidator, | 34 : public Invalidator, |
39 public SyncInvalidationListener::Delegate, | 35 public SyncInvalidationListener::Delegate, |
40 public base::NonThreadSafe { | 36 public base::NonThreadSafe { |
41 public: | 37 public: |
42 // |invalidation_state_tracker| must be initialized. | 38 // |invalidation_state_tracker| must be initialized. |
43 InvalidationNotifier( | 39 InvalidationNotifier( |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 96 |
101 // The invalidation listener. | 97 // The invalidation listener. |
102 SyncInvalidationListener invalidation_listener_; | 98 SyncInvalidationListener invalidation_listener_; |
103 | 99 |
104 DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier); | 100 DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier); |
105 }; | 101 }; |
106 | 102 |
107 } // namespace syncer | 103 } // namespace syncer |
108 | 104 |
109 #endif // COMPONENTS_INVALIDATION_IMPL_INVALIDATION_NOTIFIER_H_ | 105 #endif // COMPONENTS_INVALIDATION_IMPL_INVALIDATION_NOTIFIER_H_ |
OLD | NEW |