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

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

Issue 10803061: [Sync] Expose change location in GenericChangeProcessor errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « chrome/browser/sync/glue/generic_change_processor.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 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // the data. 43 // the data.
44 // Deletes: Requires valid tag when going to the syncer. Requires valid 44 // Deletes: Requires valid tag when going to the syncer. Requires valid
45 // specifics when coming from the syncer. 45 // specifics when coming from the syncer.
46 // Adds, Updates: Require valid tag and specifics when going to the syncer. 46 // Adds, Updates: Require valid tag and specifics when going to the syncer.
47 // Require only valid specifics when coming from the syncer. 47 // Require only valid specifics when coming from the syncer.
48 bool IsValid() const; 48 bool IsValid() const;
49 49
50 // Getters. 50 // Getters.
51 SyncChangeType change_type() const; 51 SyncChangeType change_type() const;
52 SyncData sync_data() const; 52 SyncData sync_data() const;
53 tracked_objects::Location location() const;
53 54
54 // Returns a string representation of |change_type|. 55 // Returns a string representation of |change_type|.
55 static std::string ChangeTypeToString(SyncChangeType change_type); 56 static std::string ChangeTypeToString(SyncChangeType change_type);
56 57
57 // Returns a string representation of the entire object. Used for gmock 58 // Returns a string representation of the entire object. Used for gmock
58 // printing method, PrintTo. 59 // printing method, PrintTo.
59 std::string ToString() const; 60 std::string ToString() const;
60 61
61 private: 62 private:
62 tracked_objects::Location location_; 63 tracked_objects::Location location_;
63 64
64 SyncChangeType change_type_; 65 SyncChangeType change_type_;
65 66
66 // An immutable container for the data of this SyncChange. Whenever 67 // An immutable container for the data of this SyncChange. Whenever
67 // SyncChanges are copied, they copy references to this data. 68 // SyncChanges are copied, they copy references to this data.
68 SyncData sync_data_; 69 SyncData sync_data_;
69 }; 70 };
70 71
71 // gmock printer helper. 72 // gmock printer helper.
72 void PrintTo(const SyncChange& sync_change, std::ostream* os); 73 void PrintTo(const SyncChange& sync_change, std::ostream* os);
73 74
74 } // namespace syncer 75 } // namespace syncer
75 76
76 #endif // SYNC_API_SYNC_CHANGE_H_ 77 #endif // SYNC_API_SYNC_CHANGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/generic_change_processor.cc ('k') | sync/api/sync_change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698