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

Side by Side Diff: sync/engine/syncer_proto_util.h

Issue 10795018: [Sync] Remove unneeded 'using syncer::' lines and 'syncer::' scopings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fiix indent Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « sync/engine/sync_scheduler_whitebox_unittest.cc ('k') | sync/engine/syncer_proto_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ 5 #ifndef SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
6 #define SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ 6 #define SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 static const std::string& NameFromSyncEntity( 70 static const std::string& NameFromSyncEntity(
71 const sync_pb::SyncEntity& entry); 71 const sync_pb::SyncEntity& entry);
72 72
73 // Extract the name field from a commit entry response. 73 // Extract the name field from a commit entry response.
74 static const std::string& NameFromCommitEntryResponse( 74 static const std::string& NameFromCommitEntryResponse(
75 const sync_pb::CommitResponse_EntryResponse& entry); 75 const sync_pb::CommitResponse_EntryResponse& entry);
76 76
77 // EntitySpecifics is used as a filter for the GetUpdates message to tell 77 // EntitySpecifics is used as a filter for the GetUpdates message to tell
78 // the server which datatypes to send back. This adds a datatype so that 78 // the server which datatypes to send back. This adds a datatype so that
79 // it's included in the filter. 79 // it's included in the filter.
80 static void AddToEntitySpecificDatatypesFilter(syncer::ModelType datatype, 80 static void AddToEntitySpecificDatatypesFilter(ModelType datatype,
81 sync_pb::EntitySpecifics* filter); 81 sync_pb::EntitySpecifics* filter);
82 82
83 // Get a debug string representation of the client to server response. 83 // Get a debug string representation of the client to server response.
84 static std::string ClientToServerResponseDebugString( 84 static std::string ClientToServerResponseDebugString(
85 const sync_pb::ClientToServerResponse& response); 85 const sync_pb::ClientToServerResponse& response);
86 86
87 // Get update contents as a string. Intended for logging, and intended 87 // Get update contents as a string. Intended for logging, and intended
88 // to have a smaller footprint than the protobuf's built-in pretty printer. 88 // to have a smaller footprint than the protobuf's built-in pretty printer.
89 static std::string SyncEntityDebugString(const sync_pb::SyncEntity& entry); 89 static std::string SyncEntityDebugString(const sync_pb::SyncEntity& entry);
90 90
(...skipping 15 matching lines...) Expand all
106 const sync_pb::ClientToServerResponse* response); 106 const sync_pb::ClientToServerResponse* response);
107 107
108 // Builds and sends a SyncEngineEvent to begin migration for types (specified 108 // Builds and sends a SyncEngineEvent to begin migration for types (specified
109 // in notification). 109 // in notification).
110 static void HandleMigrationDoneResponse( 110 static void HandleMigrationDoneResponse(
111 const sync_pb::ClientToServerResponse* response, 111 const sync_pb::ClientToServerResponse* response,
112 sessions::SyncSession* session); 112 sessions::SyncSession* session);
113 113
114 // Post the message using the scm, and do some processing on the returned 114 // Post the message using the scm, and do some processing on the returned
115 // headers. Decode the server response. 115 // headers. Decode the server response.
116 static bool PostAndProcessHeaders(syncer::ServerConnectionManager* scm, 116 static bool PostAndProcessHeaders(ServerConnectionManager* scm,
117 sessions::SyncSession* session, 117 sessions::SyncSession* session,
118 const sync_pb::ClientToServerMessage& msg, 118 const sync_pb::ClientToServerMessage& msg,
119 sync_pb::ClientToServerResponse* response); 119 sync_pb::ClientToServerResponse* response);
120 120
121 static base::TimeDelta GetThrottleDelay( 121 static base::TimeDelta GetThrottleDelay(
122 const sync_pb::ClientToServerResponse& response); 122 const sync_pb::ClientToServerResponse& response);
123 123
124 static void HandleThrottleError( 124 static void HandleThrottleError(
125 const SyncProtocolError& error, 125 const SyncProtocolError& error,
126 const base::TimeTicks& throttled_until, 126 const base::TimeTicks& throttled_until,
127 syncer::ThrottledDataTypeTracker* tracker, 127 ThrottledDataTypeTracker* tracker,
128 sessions::SyncSession::Delegate* delegate); 128 sessions::SyncSession::Delegate* delegate);
129 129
130 friend class SyncerProtoUtilTest; 130 friend class SyncerProtoUtilTest;
131 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, AddRequestBirthday); 131 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, AddRequestBirthday);
132 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, PostAndProcessHeaders); 132 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, PostAndProcessHeaders);
133 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, VerifyResponseBirthday); 133 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, VerifyResponseBirthday);
134 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, HandleThrottlingNoDatatypes); 134 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, HandleThrottlingNoDatatypes);
135 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, HandleThrottlingWithDatatypes); 135 FRIEND_TEST_ALL_PREFIXES(SyncerProtoUtilTest, HandleThrottlingWithDatatypes);
136 136
137 DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil); 137 DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil);
138 }; 138 };
139 139
140 } // namespace syncer 140 } // namespace syncer
141 141
142 #endif // SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ 142 #endif // SYNC_ENGINE_SYNCER_PROTO_UTIL_H_
OLDNEW
« no previous file with comments | « sync/engine/sync_scheduler_whitebox_unittest.cc ('k') | sync/engine/syncer_proto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698