Chromium Code Reviews| Index: chrome/browser/sync/api/sync_data.cc |
| diff --git a/chrome/browser/sync/api/sync_data.cc b/chrome/browser/sync/api/sync_data.cc |
| index 1c2d4967423cc72cb69288fdb3a7fe96d807d96e..cc7ad6be1be33ad583fa6f7be3a6e6873b09930d 100644 |
| --- a/chrome/browser/sync/api/sync_data.cc |
| +++ b/chrome/browser/sync/api/sync_data.cc |
| @@ -4,6 +4,8 @@ |
| #include "chrome/browser/sync/api/sync_data.h" |
| +#include <iostream> |
| + |
| #include "chrome/browser/sync/internal_api/base_node.h" |
| #include "chrome/browser/sync/protocol/sync.pb.h" |
| @@ -102,3 +104,15 @@ int64 SyncData::GetRemoteId() const { |
| bool SyncData::IsLocal() const { |
| return id_ == sync_api::kInvalidId; |
| } |
| + |
| +std::ostream& operator<<(::std::ostream& os, |
| + const SyncData& sync_data) { |
| + int64 id = (sync_data.IsLocal()) ? 0L : sync_data.GetRemoteId(); |
| + return os << |
| + "{" << id << |
| + ", " << sync_data.IsValid() << |
| + ", " << sync_data.GetDataType() << |
| + ", " << sync_data.GetTag() << |
|
akalin
2011/09/21 23:12:58
print out specifics also: use EntitySpecificsToVal
James Hawkins
2011/09/22 01:15:26
Done.
|
| + ", " << sync_data.GetTitle() << |
|
akalin
2011/09/21 23:12:58
print out IsLocal(), too. Also note that GetTag()
James Hawkins
2011/09/22 01:15:26
Done.
|
| + "}"; |
| +} |