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

Side by Side Diff: sync/api/sync_change.h

Issue 10662035: [Sync] Put everything in sync/api into csync namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 8 years, 6 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/api/fake_syncable_service.cc ('k') | sync/api/sync_change.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_API_SYNC_CHANGE_H_ 5 #ifndef SYNC_API_SYNC_CHANGE_H_
6 #define SYNC_API_SYNC_CHANGE_H_ 6 #define SYNC_API_SYNC_CHANGE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "sync/api/sync_data.h" 13 #include "sync/api/sync_data.h"
14 14
15 namespace csync {
16
15 // A SyncChange object reflects a change to a piece of synced data. The change 17 // A SyncChange object reflects a change to a piece of synced data. The change
16 // can be either a delete, add, or an update. All data relevant to the change 18 // can be either a delete, add, or an update. All data relevant to the change
17 // is encapsulated within the SyncChange, which, once created, is immutable. 19 // is encapsulated within the SyncChange, which, once created, is immutable.
18 // Note: it is safe and cheap to pass these by value or make copies, as they do 20 // Note: it is safe and cheap to pass these by value or make copies, as they do
19 // not create deep copies of their internal data. 21 // not create deep copies of their internal data.
20 class SyncChange { 22 class SyncChange {
21 public: 23 public:
22 enum SyncChangeType { 24 enum SyncChangeType {
23 ACTION_INVALID, 25 ACTION_INVALID,
24 ACTION_ADD, 26 ACTION_ADD,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 SyncChangeType change_type_; 59 SyncChangeType change_type_;
58 60
59 // An immutable container for the data of this SyncChange. Whenever 61 // An immutable container for the data of this SyncChange. Whenever
60 // SyncChanges are copied, they copy references to this data. 62 // SyncChanges are copied, they copy references to this data.
61 SyncData sync_data_; 63 SyncData sync_data_;
62 }; 64 };
63 65
64 // gmock printer helper. 66 // gmock printer helper.
65 void PrintTo(const SyncChange& sync_change, std::ostream* os); 67 void PrintTo(const SyncChange& sync_change, std::ostream* os);
66 68
69 } // namespace csync
70
67 #endif // SYNC_API_SYNC_CHANGE_H_ 71 #endif // SYNC_API_SYNC_CHANGE_H_
OLDNEW
« no previous file with comments | « sync/api/fake_syncable_service.cc ('k') | sync/api/sync_change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698