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

Side by Side Diff: sync/api/sync_change.cc

Issue 10795018: [Sync] Remove unneeded 'using syncer::' lines and 'syncer::' scopings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fiix indent Created 8 years, 5 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
« no previous file with comments | « sync/api/fake_syncable_service.cc ('k') | sync/api/sync_change_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "sync/api/sync_change.h" 5 #include "sync/api/sync_change.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 namespace syncer { 9 namespace syncer {
10 10
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 SyncChange::~SyncChange() {} 24 SyncChange::~SyncChange() {}
25 25
26 bool SyncChange::IsValid() const { 26 bool SyncChange::IsValid() const {
27 if (change_type_ == ACTION_INVALID || !sync_data_.IsValid()) 27 if (change_type_ == ACTION_INVALID || !sync_data_.IsValid())
28 return false; 28 return false;
29 29
30 // Data from the syncer must always have valid specifics. 30 // Data from the syncer must always have valid specifics.
31 if (!sync_data_.IsLocal()) 31 if (!sync_data_.IsLocal())
32 return syncer::IsRealDataType(sync_data_.GetDataType()); 32 return IsRealDataType(sync_data_.GetDataType());
33 33
34 // Local changes must always have a tag and specify a valid datatype. 34 // Local changes must always have a tag and specify a valid datatype.
35 if (sync_data_.GetTag().empty() || 35 if (sync_data_.GetTag().empty() ||
36 !syncer::IsRealDataType(sync_data_.GetDataType())) { 36 !IsRealDataType(sync_data_.GetDataType())) {
37 return false; 37 return false;
38 } 38 }
39 39
40 // Adds and updates must have a non-unique-title. 40 // Adds and updates must have a non-unique-title.
41 if (change_type_ == ACTION_ADD || change_type_ == ACTION_UPDATE) 41 if (change_type_ == ACTION_ADD || change_type_ == ACTION_UPDATE)
42 return (!sync_data_.GetTitle().empty()); 42 return (!sync_data_.GetTitle().empty());
43 43
44 return true; 44 return true;
45 } 45 }
46 46
(...skipping 26 matching lines...) Expand all
73 return "{ " + location_.ToString() + ", changeType: " + 73 return "{ " + location_.ToString() + ", changeType: " +
74 ChangeTypeToString(change_type_) + ", syncData: " + 74 ChangeTypeToString(change_type_) + ", syncData: " +
75 sync_data_.ToString() + "}"; 75 sync_data_.ToString() + "}";
76 } 76 }
77 77
78 void PrintTo(const SyncChange& sync_change, std::ostream* os) { 78 void PrintTo(const SyncChange& sync_change, std::ostream* os) {
79 *os << sync_change.ToString(); 79 *os << sync_change.ToString();
80 } 80 }
81 81
82 } // namespace syncer 82 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/api/fake_syncable_service.cc ('k') | sync/api/sync_change_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698