Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: components/sync/engine_impl/syncer_proto_util.cc

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Fix tools and iOS. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "components/sync/engine_impl/syncer_proto_util.h" 5 #include "components/sync/engine_impl/syncer_proto_util.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 11 matching lines...) Expand all
22 #include "components/sync/syncable/syncable_proto_util.h" 22 #include "components/sync/syncable/syncable_proto_util.h"
23 #include "google_apis/google_api_keys.h" 23 #include "google_apis/google_api_keys.h"
24 24
25 using std::string; 25 using std::string;
26 using std::stringstream; 26 using std::stringstream;
27 using sync_pb::ClientToServerMessage; 27 using sync_pb::ClientToServerMessage;
28 using sync_pb::ClientToServerResponse; 28 using sync_pb::ClientToServerResponse;
29 29
30 namespace syncer { 30 namespace syncer {
31 31
32 using syncable::BASE_VERSION; 32 using syncer::syncable::BASE_VERSION;
skym 2016/09/30 19:03:22 Is this really needed? Seems like you shouldn't ha
maxbogue 2016/09/30 20:13:41 Done, here and in another 20ish files where I mess
33 using syncable::CTIME; 33 using syncer::syncable::CTIME;
34 using syncable::ID; 34 using syncer::syncable::ID;
35 using syncable::IS_DEL; 35 using syncer::syncable::IS_DEL;
36 using syncable::IS_DIR; 36 using syncer::syncable::IS_DIR;
37 using syncable::IS_UNSYNCED; 37 using syncer::syncable::IS_UNSYNCED;
38 using syncable::MTIME; 38 using syncer::syncable::MTIME;
39 using syncable::PARENT_ID; 39 using syncer::syncable::PARENT_ID;
40 40
41 namespace { 41 namespace {
42 42
43 // Time to backoff syncing after receiving a throttled response. 43 // Time to backoff syncing after receiving a throttled response.
44 const int kSyncDelayAfterThrottled = 2 * 60 * 60; // 2 hours 44 const int kSyncDelayAfterThrottled = 2 * 60 * 60; // 2 hours
45 45
46 void LogResponseProfilingData(const ClientToServerResponse& response) { 46 void LogResponseProfilingData(const ClientToServerResponse& response) {
47 if (response.has_profiling_data()) { 47 if (response.has_profiling_data()) {
48 stringstream response_trace; 48 stringstream response_trace;
49 response_trace << "Server response trace:"; 49 response_trace << "Server response trace:";
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 std::string SyncerProtoUtil::ClientToServerResponseDebugString( 592 std::string SyncerProtoUtil::ClientToServerResponseDebugString(
593 const ClientToServerResponse& response) { 593 const ClientToServerResponse& response) {
594 // Add more handlers as needed. 594 // Add more handlers as needed.
595 std::string output; 595 std::string output;
596 if (response.has_get_updates()) 596 if (response.has_get_updates())
597 output.append(GetUpdatesResponseString(response.get_updates())); 597 output.append(GetUpdatesResponseString(response.get_updates()));
598 return output; 598 return output;
599 } 599 }
600 600
601 } // namespace syncer 601 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698