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

Unified Diff: chrome/browser/sync/api/sync_change.cc

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/api/sync_change.cc
diff --git a/chrome/browser/sync/api/sync_change.cc b/chrome/browser/sync/api/sync_change.cc
index afd321d646d7d31f16541f07ceaf64e0fdf9ac36..8f3f3288227bf1971dee2ef70300f465597f8028 100644
--- a/chrome/browser/sync/api/sync_change.cc
+++ b/chrome/browser/sync/api/sync_change.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/sync/api/sync_change.h"
+#include <iostream>
+
SyncChange::SyncChange() : change_type_(ACTION_INVALID) {
}
@@ -59,3 +61,11 @@ std::string SyncChange::ChangeTypeToString(SyncChangeType change_type) {
}
return std::string();
}
+
+std::ostream& operator<<(::std::ostream& os,
+ const SyncChange& sync_change) {
+ return os <<
+ "{" << sync_change.change_type() <<
akalin 2011/09/21 23:12:58 use ChangeTypeToString
James Hawkins 2011/09/22 01:15:26 Done.
+ ", " << sync_change.sync_data() <<
+ "}";
+}

Powered by Google App Engine
This is Rietveld 408576698