| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_ | 5 #ifndef SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_ |
| 6 #define SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_ | 6 #define SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "google/cacheinvalidation/include/system-resources.h" | 14 #include "google/cacheinvalidation/include/system-resources.h" |
| 15 #include "jingle/notifier/listener/push_client_observer.h" | 15 #include "jingle/notifier/listener/push_client_observer.h" |
| 16 #include "sync/base/sync_export.h" |
| 16 | 17 |
| 17 namespace notifier { | 18 namespace notifier { |
| 18 class PushClient; | 19 class PushClient; |
| 19 } // namespace notifier | 20 } // namespace notifier |
| 20 | 21 |
| 21 namespace syncer { | 22 namespace syncer { |
| 22 | 23 |
| 23 // A PushClientChannel is an implementation of NetworkChannel that | 24 // A PushClientChannel is an implementation of NetworkChannel that |
| 24 // routes messages through a PushClient. | 25 // routes messages through a PushClient. |
| 25 class PushClientChannel | 26 class SYNC_EXPORT_PRIVATE PushClientChannel |
| 26 : public invalidation::NetworkChannel, | 27 : public NON_EXPORTED_BASE(invalidation::NetworkChannel), |
| 27 public notifier::PushClientObserver { | 28 public NON_EXPORTED_BASE(notifier::PushClientObserver) { |
| 28 public: | 29 public: |
| 29 // |push_client| is guaranteed to be destroyed only when this object | 30 // |push_client| is guaranteed to be destroyed only when this object |
| 30 // is destroyed. | 31 // is destroyed. |
| 31 explicit PushClientChannel(scoped_ptr<notifier::PushClient> push_client); | 32 explicit PushClientChannel(scoped_ptr<notifier::PushClient> push_client); |
| 32 | 33 |
| 33 virtual ~PushClientChannel(); | 34 virtual ~PushClientChannel(); |
| 34 | 35 |
| 35 // If not connected, connects with the given credentials. If | 36 // If not connected, connects with the given credentials. If |
| 36 // already connected, the next connection attempt will use the given | 37 // already connected, the next connection attempt will use the given |
| 37 // credentials. | 38 // credentials. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 95 |
| 95 // Scheduling hash. | 96 // Scheduling hash. |
| 96 int64 scheduling_hash_; | 97 int64 scheduling_hash_; |
| 97 | 98 |
| 98 DISALLOW_COPY_AND_ASSIGN(PushClientChannel); | 99 DISALLOW_COPY_AND_ASSIGN(PushClientChannel); |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 } // namespace syncer | 102 } // namespace syncer |
| 102 | 103 |
| 103 #endif // SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_ | 104 #endif // SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_ |
| OLD | NEW |