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

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

Issue 7978044: Sync/Valgrind: Add gmock printers for SyncChange, SyncData, SyncError. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
OLDNEW
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 <iosfwd>
9 #include <string> 10 #include <string>
10 #include <vector> 11 #include <vector>
11 12
12 #include "chrome/browser/sync/api/sync_data.h" 13 #include "chrome/browser/sync/api/sync_data.h"
13 14
14 // A SyncChange object reflects a change to a piece of synced data. The change 15 // A SyncChange object reflects a change to a piece of synced data. The change
15 // can be either a delete, add, or an update. All data relevant to the change 16 // can be either a delete, add, or an update. All data relevant to the change
16 // is encapsulated within the SyncChange, which, once created, is immutable. 17 // is encapsulated within the SyncChange, which, once created, is immutable.
17 // Note: it is safe and cheap to pass these by value or make copies, as they do 18 // Note: it is safe and cheap to pass these by value or make copies, as they do
18 // not create deep copies of their internal data. 19 // not create deep copies of their internal data.
(...skipping 30 matching lines...) Expand all
49 static std::string ChangeTypeToString(SyncChangeType change_type); 50 static std::string ChangeTypeToString(SyncChangeType change_type);
50 51
51 private: 52 private:
52 SyncChangeType change_type_; 53 SyncChangeType change_type_;
53 54
54 // An immutable container for the data of this SyncChange. Whenever 55 // An immutable container for the data of this SyncChange. Whenever
55 // SyncChanges are copied, they copy references to this data. 56 // SyncChanges are copied, they copy references to this data.
56 SyncData sync_data_; 57 SyncData sync_data_;
57 }; 58 };
58 59
60 // Printing operator - helps gtest produce readable error messages.
61 std::ostream& operator<<(std::ostream& os, const SyncChange& sync_change);
akalin 2011/09/21 23:12:58 This is against Google style. I'd prefer to add '
James Hawkins 2011/09/22 01:15:26 Done.
62
59 #endif // CHROME_BROWSER_SYNC_API_SYNC_CHANGE_H_ 63 #endif // CHROME_BROWSER_SYNC_API_SYNC_CHANGE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/api/sync_change.cc » ('j') | chrome/browser/sync/api/sync_change.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698