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

Unified Diff: chrome/browser/sync/api/sync_error.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_error.cc
diff --git a/chrome/browser/sync/api/sync_error.cc b/chrome/browser/sync/api/sync_error.cc
index 6ffa495466bc9e13b6a8ce18790db7e354ed8ac6..2ec9a4b5393ce462b58865724e1429480b7d6b14 100644
--- a/chrome/browser/sync/api/sync_error.cc
+++ b/chrome/browser/sync/api/sync_error.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/sync/api/sync_error.h"
+#include <iostream>
+
#include "base/logging.h"
#include "base/tracked.h"
@@ -90,3 +92,11 @@ void SyncError::PrintLogError() const {
LOG_IS_ON(ERROR))
<< syncable::ModelTypeToString(type_) << " Sync Error: " << message_;
}
+
+std::ostream& operator<<(std::ostream& os, const SyncError& sync_error) {
+ return os <<
+ "{" << sync_error.IsSet() <<
+ ", " << sync_error.type() <<
akalin 2011/09/21 23:12:58 print out location to: use location->ToString()
akalin 2011/09/21 23:12:58 use ModelTypeToString()
James Hawkins 2011/09/22 01:15:26 Done.
James Hawkins 2011/09/22 01:15:26 Done.
+ ", " << sync_error.message() <<
+ "}";
+}
« chrome/browser/sync/api/sync_data.cc ('K') | « chrome/browser/sync/api/sync_error.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698