| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ | 5 #ifndef SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ |
| 6 #define SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ | 6 #define SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/atomicops.h" | 12 #include "base/atomicops.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
| 17 #include "base/threading/non_thread_safe.h" | 17 #include "base/threading/non_thread_safe.h" |
| 18 #include "base/threading/thread_checker.h" | 18 #include "base/threading/thread_checker.h" |
| 19 #include "sync/syncable/syncable_id.h" | 19 #include "sync/syncable/syncable_id.h" |
| 20 | 20 |
| 21 namespace syncable { | 21 namespace syncable { |
| 22 class Directory; | 22 class Directory; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace sync_pb { | 25 namespace sync_pb { |
| 26 class ClientToServerMessage; | 26 class ClientToServerMessage; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace csync { | 29 namespace syncer { |
| 30 | 30 |
| 31 static const int32 kUnsetResponseCode = -1; | 31 static const int32 kUnsetResponseCode = -1; |
| 32 static const int32 kUnsetContentLength = -1; | 32 static const int32 kUnsetContentLength = -1; |
| 33 static const int32 kUnsetPayloadLength = -1; | 33 static const int32 kUnsetPayloadLength = -1; |
| 34 | 34 |
| 35 // HttpResponse gathers the relevant output properties of an HTTP request. | 35 // HttpResponse gathers the relevant output properties of an HTTP request. |
| 36 // Depending on the value of the server_status code, response_code, and | 36 // Depending on the value of the server_status code, response_code, and |
| 37 // content_length may not be valid. | 37 // content_length may not be valid. |
| 38 struct HttpResponse { | 38 struct HttpResponse { |
| 39 enum ServerConnectionCode { | 39 enum ServerConnectionCode { |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 }; | 341 }; |
| 342 | 342 |
| 343 // Fills a ClientToServerMessage with the appropriate share and birthday | 343 // Fills a ClientToServerMessage with the appropriate share and birthday |
| 344 // settings. | 344 // settings. |
| 345 bool FillMessageWithShareDetails(sync_pb::ClientToServerMessage* csm, | 345 bool FillMessageWithShareDetails(sync_pb::ClientToServerMessage* csm, |
| 346 syncable::Directory* manager, | 346 syncable::Directory* manager, |
| 347 const std::string& share); | 347 const std::string& share); |
| 348 | 348 |
| 349 std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr); | 349 std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr); |
| 350 | 350 |
| 351 } // namespace csync | 351 } // namespace syncer |
| 352 | 352 |
| 353 #endif // SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ | 353 #endif // SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ |
| OLD | NEW |