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

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

Issue 10696087: [Sync] Move ModelType and related classes to 'syncer' namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort headers, update copyrights 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/syncer_util.cc ('k') | sync/engine/throttled_data_type_tracker.h » ('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 // Wrappers to help us work with ids and protobuffers. 5 // Wrappers to help us work with ids and protobuffers.
6 6
7 #ifndef SYNC_ENGINE_SYNCPROTO_H_ 7 #ifndef SYNC_ENGINE_SYNCPROTO_H_
8 #define SYNC_ENGINE_SYNCPROTO_H_ 8 #define SYNC_ENGINE_SYNCPROTO_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 // Binary predicate helper to determine whether an Entity represents a folder 54 // Binary predicate helper to determine whether an Entity represents a folder
55 // or non-folder object. Use this instead of checking these properties 55 // or non-folder object. Use this instead of checking these properties
56 // directly, because the addition of bookmarks to the protobuf schema 56 // directly, because the addition of bookmarks to the protobuf schema
57 // makes the check slightly more tricky. 57 // makes the check slightly more tricky.
58 bool IsFolder() const { 58 bool IsFolder() const {
59 return ((has_folder() && folder()) || 59 return ((has_folder() && folder()) ||
60 (has_bookmarkdata() && bookmarkdata().bookmark_folder())); 60 (has_bookmarkdata() && bookmarkdata().bookmark_folder()));
61 } 61 }
62 62
63 syncable::ModelType GetModelType() const { 63 syncer::ModelType GetModelType() const {
64 return syncable::GetModelType(*this); 64 return syncer::GetModelType(*this);
65 } 65 }
66 }; 66 };
67 67
68 class CommitResponse_EntryResponse 68 class CommitResponse_EntryResponse
69 : public IdWrapper<sync_pb::CommitResponse_EntryResponse> { 69 : public IdWrapper<sync_pb::CommitResponse_EntryResponse> {
70 }; 70 };
71 71
72 class ClientToServerMessage : public sync_pb::ClientToServerMessage { 72 class ClientToServerMessage : public sync_pb::ClientToServerMessage {
73 public: 73 public:
74 ClientToServerMessage() { 74 ClientToServerMessage() {
75 set_protocol_version(protocol_version()); 75 set_protocol_version(protocol_version());
76 } 76 }
77 }; 77 };
78 78
79 typedef sync_pb::CommitMessage CommitMessage; 79 typedef sync_pb::CommitMessage CommitMessage;
80 typedef sync_pb::ClientToServerResponse ClientToServerResponse; 80 typedef sync_pb::ClientToServerResponse ClientToServerResponse;
81 typedef sync_pb::CommitResponse CommitResponse; 81 typedef sync_pb::CommitResponse CommitResponse;
82 typedef sync_pb::GetUpdatesResponse GetUpdatesResponse; 82 typedef sync_pb::GetUpdatesResponse GetUpdatesResponse;
83 typedef sync_pb::GetUpdatesMessage GetUpdatesMessage; 83 typedef sync_pb::GetUpdatesMessage GetUpdatesMessage;
84 84
85 } // namespace syncer 85 } // namespace syncer
86 86
87 #endif // SYNC_ENGINE_SYNCPROTO_H_ 87 #endif // SYNC_ENGINE_SYNCPROTO_H_
OLDNEW
« no previous file with comments | « sync/engine/syncer_util.cc ('k') | sync/engine/throttled_data_type_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698