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

Side by Side Diff: sync/engine/update_applicator.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
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/engine/update_applicator.h" 5 #include "sync/engine/update_applicator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "sync/engine/syncer_util.h" 10 #include "sync/engine/syncer_util.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 return true; 95 return true;
96 } 96 }
97 97
98 void UpdateApplicator::Advance() { 98 void UpdateApplicator::Advance() {
99 --end_; 99 --end_;
100 *pointer_ = *end_; 100 *pointer_ = *end_;
101 } 101 }
102 102
103 bool UpdateApplicator::SkipUpdate(const syncable::Entry& entry) { 103 bool UpdateApplicator::SkipUpdate(const syncable::Entry& entry) {
104 syncer::ModelType type = entry.GetServerModelType(); 104 ModelType type = entry.GetServerModelType();
105 ModelSafeGroup g = GetGroupForModelType(type, routing_info_); 105 ModelSafeGroup g = GetGroupForModelType(type, routing_info_);
106 // The set of updates passed to the UpdateApplicator should already 106 // The set of updates passed to the UpdateApplicator should already
107 // be group-filtered. 107 // be group-filtered.
108 if (g != group_filter_) { 108 if (g != group_filter_) {
109 NOTREACHED(); 109 NOTREACHED();
110 return true; 110 return true;
111 } 111 }
112 if (g == GROUP_PASSIVE && 112 if (g == GROUP_PASSIVE &&
113 !routing_info_.count(type) && 113 !routing_info_.count(type) &&
114 type != syncer::UNSPECIFIED && 114 type != UNSPECIFIED &&
115 type != syncer::TOP_LEVEL_FOLDER) { 115 type != TOP_LEVEL_FOLDER) {
116 DVLOG(1) << "Skipping update application, type not permitted."; 116 DVLOG(1) << "Skipping update application, type not permitted.";
117 return true; 117 return true;
118 } 118 }
119 return false; 119 return false;
120 } 120 }
121 121
122 bool UpdateApplicator::AllUpdatesApplied() const { 122 bool UpdateApplicator::AllUpdatesApplied() const {
123 return application_results_.no_conflicts() && begin_ == end_; 123 return application_results_.no_conflicts() && begin_ == end_;
124 } 124 }
125 125
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 conflicting_ids_.clear(); 183 conflicting_ids_.clear();
184 encryption_conflict_ids_.clear(); 184 encryption_conflict_ids_.clear();
185 hierarchy_conflict_ids_.clear(); 185 hierarchy_conflict_ids_.clear();
186 } 186 }
187 187
188 bool UpdateApplicator::ResultTracker::no_conflicts() const { 188 bool UpdateApplicator::ResultTracker::no_conflicts() const {
189 return conflicting_ids_.empty(); 189 return conflicting_ids_.empty();
190 } 190 }
191 191
192 } // namespace syncer 192 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/throttled_data_type_tracker_unittest.cc ('k') | sync/engine/verify_updates_command.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698