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_IMPL_PUSH_CLIENT_CHANNEL_H_ | 5 #ifndef COMPONENTS_INVALIDATION_IMPL_PUSH_CLIENT_CHANNEL_H_ |
6 #define COMPONENTS_INVALIDATION_IMPL_PUSH_CLIENT_CHANNEL_H_ | 6 #define COMPONENTS_INVALIDATION_IMPL_PUSH_CLIENT_CHANNEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "components/invalidation/impl/sync_system_resources.h" | 13 #include "components/invalidation/impl/sync_system_resources.h" |
14 #include "components/invalidation/public/invalidation_export.h" | 14 #include "components/invalidation/public/invalidation_export.h" |
15 #include "jingle/notifier/listener/push_client_observer.h" | 15 #include "jingle/notifier/listener/push_client_observer.h" |
16 | 16 |
17 namespace notifier { | 17 namespace notifier { |
18 class PushClient; | 18 class PushClient; |
19 } // namespace notifier | 19 } // namespace notifier |
20 | 20 |
21 namespace syncer { | 21 namespace syncer { |
22 | 22 |
23 // A PushClientChannel is an implementation of NetworkChannel that | 23 // A PushClientChannel is an implementation of NetworkChannel that |
24 // routes messages through a PushClient. | 24 // routes messages through a PushClient. |
25 class INVALIDATION_EXPORT_PRIVATE PushClientChannel | 25 class INVALIDATION_EXPORT PushClientChannel |
26 : public SyncNetworkChannel, | 26 : public SyncNetworkChannel, |
27 public NON_EXPORTED_BASE(notifier::PushClientObserver) { | 27 public NON_EXPORTED_BASE(notifier::PushClientObserver) { |
28 public: | 28 public: |
29 // |push_client| is guaranteed to be destroyed only when this object | 29 // |push_client| is guaranteed to be destroyed only when this object |
30 // is destroyed. | 30 // is destroyed. |
31 explicit PushClientChannel(scoped_ptr<notifier::PushClient> push_client); | 31 explicit PushClientChannel(scoped_ptr<notifier::PushClient> push_client); |
32 | 32 |
33 ~PushClientChannel() override; | 33 ~PushClientChannel() override; |
34 | 34 |
35 // invalidation::NetworkChannel implementation. | 35 // invalidation::NetworkChannel implementation. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 // This count is saved for displaying statatistics. | 83 // This count is saved for displaying statatistics. |
84 int sent_messages_count_; | 84 int sent_messages_count_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(PushClientChannel); | 86 DISALLOW_COPY_AND_ASSIGN(PushClientChannel); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace syncer | 89 } // namespace syncer |
90 | 90 |
91 #endif // COMPONENTS_INVALIDATION_IMPL_PUSH_CLIENT_CHANNEL_H_ | 91 #endif // COMPONENTS_INVALIDATION_IMPL_PUSH_CLIENT_CHANNEL_H_ |
OLD | NEW |