OLD | NEW |
1 // Copyright 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 COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_ |
6 #define COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <iosfwd> | 10 #include <iosfwd> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/atomicops.h" | 14 #include "base/atomicops.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
18 #include "base/synchronization/lock.h" | 18 #include "base/synchronization/lock.h" |
19 #include "base/threading/non_thread_safe.h" | 19 #include "base/threading/non_thread_safe.h" |
20 #include "base/threading/thread_checker.h" | 20 #include "base/threading/thread_checker.h" |
21 #include "components/sync/base/cancelation_observer.h" | 21 #include "components/sync/base/cancelation_observer.h" |
22 #include "components/sync/syncable/syncable_id.h" | 22 #include "components/sync/syncable/syncable_id.h" |
23 | 23 |
24 namespace sync_pb { | |
25 class ClientToServerMessage; | |
26 } | |
27 | |
28 namespace syncer { | 24 namespace syncer { |
29 | 25 |
30 class CancelationSignal; | 26 class CancelationSignal; |
31 | 27 |
32 namespace syncable { | |
33 class Directory; | |
34 } | |
35 | |
36 static const int32_t kUnsetResponseCode = -1; | 28 static const int32_t kUnsetResponseCode = -1; |
37 static const int32_t kUnsetContentLength = -1; | 29 static const int32_t kUnsetContentLength = -1; |
38 static const int32_t kUnsetPayloadLength = -1; | 30 static const int32_t kUnsetPayloadLength = -1; |
39 | 31 |
40 // HttpResponse gathers the relevant output properties of an HTTP request. | 32 // HttpResponse gathers the relevant output properties of an HTTP request. |
41 // Depending on the value of the server_status code, response_code, and | 33 // Depending on the value of the server_status code, response_code, and |
42 // content_length may not be valid. | 34 // content_length may not be valid. |
43 struct HttpResponse { | 35 struct HttpResponse { |
44 enum ServerConnectionCode { | 36 enum ServerConnectionCode { |
45 // For uninitialized state. | 37 // For uninitialized state. |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 bool signal_handler_registered_; | 292 bool signal_handler_registered_; |
301 | 293 |
302 DISALLOW_COPY_AND_ASSIGN(ServerConnectionManager); | 294 DISALLOW_COPY_AND_ASSIGN(ServerConnectionManager); |
303 }; | 295 }; |
304 | 296 |
305 std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr); | 297 std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr); |
306 | 298 |
307 } // namespace syncer | 299 } // namespace syncer |
308 | 300 |
309 #endif // COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_ | 301 #endif // COMPONENTS_SYNC_ENGINE_IMPL_NET_SERVER_CONNECTION_MANAGER_H_ |
OLD | NEW |