OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_API_SYNC_CHANGE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_API_SYNC_CHANGE_H_ |
6 #define CHROME_BROWSER_SYNC_API_SYNC_CHANGE_H_ | 6 #define CHROME_BROWSER_SYNC_API_SYNC_CHANGE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 27 matching lines...) Expand all Loading... |
38 // Deletes: Requires valid tag when going to the syncer. Requires valid | 38 // Deletes: Requires valid tag when going to the syncer. Requires valid |
39 // specifics when coming from the syncer. | 39 // specifics when coming from the syncer. |
40 // Adds, Updates: Require valid tag and specifics when going to the syncer. | 40 // Adds, Updates: Require valid tag and specifics when going to the syncer. |
41 // Require only valid specifics when coming from the syncer. | 41 // Require only valid specifics when coming from the syncer. |
42 bool IsValid() const; | 42 bool IsValid() const; |
43 | 43 |
44 // Getters. | 44 // Getters. |
45 SyncChangeType change_type() const; | 45 SyncChangeType change_type() const; |
46 SyncData sync_data() const; | 46 SyncData sync_data() const; |
47 | 47 |
48 // Returns a string representation of |change_type|. | |
49 static std::string ChangeTypeToString(SyncChangeType change_type); | |
50 | |
51 private: | 48 private: |
52 SyncChangeType change_type_; | 49 SyncChangeType change_type_; |
53 | 50 |
54 // An immutable container for the data of this SyncChange. Whenever | 51 // An immutable container for the data of this SyncChange. Whenever |
55 // SyncChanges are copied, they copy references to this data. | 52 // SyncChanges are copied, they copy references to this data. |
56 SyncData sync_data_; | 53 SyncData sync_data_; |
57 }; | 54 }; |
58 | 55 |
59 #endif // CHROME_BROWSER_SYNC_API_SYNC_CHANGE_H_ | 56 #endif // CHROME_BROWSER_SYNC_API_SYNC_CHANGE_H_ |
OLD | NEW |