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

Unified Diff: chrome/browser/sync/engine/syncer_proto_util.h

Issue 2844037: Fix handling of undeletion within the syncer. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Whitespace. Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/engine/syncer_proto_util.h
diff --git a/chrome/browser/sync/engine/syncer_proto_util.h b/chrome/browser/sync/engine/syncer_proto_util.h
index fd3089f87a1a77ea06ade8bbe2e086df97673487..ae668edd8c2311b7351812ade3f6eb4e088f9c26 100644
--- a/chrome/browser/sync/engine/syncer_proto_util.h
+++ b/chrome/browser/sync/engine/syncer_proto_util.h
@@ -42,7 +42,8 @@ class SyncerProtoUtil {
// Returns true on success. Also handles store birthday verification:
// session->status()->syncer_stuck_ is set true if the birthday is
// incorrect. A false value will always be returned if birthday is bad.
- static bool PostClientToServerMessage(ClientToServerMessage* msg,
+ static bool PostClientToServerMessage(
+ const ClientToServerMessage& msg,
sync_pb::ClientToServerResponse* response,
sessions::SyncSession* session);
@@ -66,8 +67,8 @@ class SyncerProtoUtil {
std::string* proto_bytes);
// Extract the name field from a sync entity.
- static const std::string& NameFromSyncEntity(const SyncEntity& entry);
-
+ static const std::string& NameFromSyncEntity(
+ const sync_pb::SyncEntity& entry);
// Extract the name field from a commit entry response.
static const std::string& NameFromCommitEntryResponse(
@@ -87,6 +88,10 @@ class SyncerProtoUtil {
// to have a smaller footprint than the protobuf's built-in pretty printer.
static std::string SyncEntityDebugString(const sync_pb::SyncEntity& entry);
+ // Pull the birthday from the dir and put it into the msg.
+ static void AddRequestBirthday(syncable::Directory* dir,
+ ClientToServerMessage* msg);
+
private:
SyncerProtoUtil() {}
@@ -97,15 +102,11 @@ class SyncerProtoUtil {
static bool VerifyResponseBirthday(syncable::Directory* dir,
const sync_pb::ClientToServerResponse* response);
- // Pull the birthday from the dir and put it into the msg.
- static void AddRequestBirthday(syncable::Directory* dir,
- ClientToServerMessage* msg);
-
// Post the message using the scm, and do some processing on the returned
// headers. Decode the server response.
static bool PostAndProcessHeaders(browser_sync::ServerConnectionManager* scm,
browser_sync::AuthWatcher* authwatcher,
- ClientToServerMessage* msg,
+ const ClientToServerMessage& msg,
sync_pb::ClientToServerResponse* response);
friend class SyncerProtoUtilTest;
« no previous file with comments | « chrome/browser/sync/engine/process_commit_response_command.cc ('k') | chrome/browser/sync/engine/syncer_proto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698