OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome/browser/sync/engine/net/server_connection_manager.h" | 5 #include "chrome/browser/sync/engine/net/server_connection_manager.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 | 8 |
9 #include <ostream> | 9 #include <ostream> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "chrome/browser/sync/engine/net/http_return.h" | 14 #include "chrome/browser/sync/engine/net/http_return.h" |
15 #include "chrome/browser/sync/engine/net/url_translator.h" | 15 #include "chrome/browser/sync/engine/net/url_translator.h" |
16 #include "chrome/browser/sync/engine/syncapi.h" | 16 #include "chrome/browser/sync/engine/syncapi.h" |
17 #include "chrome/browser/sync/engine/syncer.h" | 17 #include "chrome/browser/sync/engine/syncer.h" |
18 #include "chrome/browser/sync/engine/syncproto.h" | 18 #include "chrome/browser/sync/engine/syncproto.h" |
19 #include "chrome/browser/sync/protocol/sync.pb.h" | 19 #include "chrome/browser/sync/protocol/sync.pb.h" |
20 #include "chrome/browser/sync/syncable/directory_manager.h" | 20 #include "chrome/browser/sync/syncable/directory_manager.h" |
21 #include "chrome/browser/sync/util/character_set_converters.h" | |
22 #include "chrome/browser/sync/util/event_sys-inl.h" | 21 #include "chrome/browser/sync/util/event_sys-inl.h" |
23 | 22 |
24 namespace browser_sync { | 23 namespace browser_sync { |
25 | 24 |
26 using std::ostream; | 25 using std::ostream; |
27 using std::string; | 26 using std::string; |
28 using std::vector; | 27 using std::vector; |
29 | 28 |
30 static const char kSyncServerSyncPath[] = "/command/"; | 29 static const char kSyncServerSyncPath[] = "/command/"; |
31 | 30 |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 syncable::DirectoryManager* manager, | 347 syncable::DirectoryManager* manager, |
349 const PathString &share) { | 348 const PathString &share) { |
350 syncable::ScopedDirLookup dir(manager, share); | 349 syncable::ScopedDirLookup dir(manager, share); |
351 if (!dir.good()) { | 350 if (!dir.good()) { |
352 LOG(INFO) << "Dir lookup failed"; | 351 LOG(INFO) << "Dir lookup failed"; |
353 return false; | 352 return false; |
354 } | 353 } |
355 string birthday = dir->store_birthday(); | 354 string birthday = dir->store_birthday(); |
356 if (!birthday.empty()) | 355 if (!birthday.empty()) |
357 csm->set_store_birthday(birthday); | 356 csm->set_store_birthday(birthday); |
358 csm->set_share(ToUTF8(share).get_string()); | 357 csm->set_share(share); |
359 return true; | 358 return true; |
360 } | 359 } |
361 | 360 |
362 } // namespace browser_sync | 361 } // namespace browser_sync |
363 | 362 |
364 std::ostream& operator << (std::ostream& s, | 363 std::ostream& operator << (std::ostream& s, |
365 const struct browser_sync::HttpResponse& hr) { | 364 const struct browser_sync::HttpResponse& hr) { |
366 s << " Response Code (bogus on error): " << hr.response_code; | 365 s << " Response Code (bogus on error): " << hr.response_code; |
367 s << " Content-Length (bogus on error): " << hr.content_length; | 366 s << " Content-Length (bogus on error): " << hr.content_length; |
368 s << " Server Status: " << hr.server_status; | 367 s << " Server Status: " << hr.server_status; |
369 return s; | 368 return s; |
370 } | 369 } |
OLD | NEW |