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

Unified Diff: sync/api/sync_change.cc

Issue 217063005: Separate SyncData methods into three groups, local, remote, and common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@syncapi
Patch Set: Reorganize Local and Remote based on offline feedback. Created 6 years, 9 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: sync/api/sync_change.cc
diff --git a/sync/api/sync_change.cc b/sync/api/sync_change.cc
index 8dedd9cb1768fbb0b3f99aebe8ae38e0cad773f7..4e0a8b822d04fbe7c68637d79ff886c0a66197a8 100644
--- a/sync/api/sync_change.cc
+++ b/sync/api/sync_change.cc
@@ -31,8 +31,10 @@ bool SyncChange::IsValid() const {
if (!sync_data_.IsLocal())
return IsRealDataType(sync_data_.GetDataType());
+ SyncDataLocal sync_data_local(sync_data_.AsLocal());
+
// Local changes must always have a tag and specify a valid datatype.
- if (sync_data_.GetTag().empty() ||
+ if (sync_data_local.GetTag().empty() ||
!IsRealDataType(sync_data_.GetDataType())) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698