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

Side by Side Diff: chrome/browser/sync/engine/syncer_proto_util.cc

Issue 429003: Final part of PathString cleanup. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « chrome/browser/sync/engine/syncer.cc ('k') | chrome/browser/sync/engine/syncer_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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/sync/engine/syncer_proto_util.h" 5 #include "chrome/browser/sync/engine/syncer_proto_util.h"
6 6
7 #include "chrome/browser/sync/engine/net/server_connection_manager.h" 7 #include "chrome/browser/sync/engine/net/server_connection_manager.h"
8 #include "chrome/browser/sync/engine/syncer.h" 8 #include "chrome/browser/sync/engine/syncer.h"
9 #include "chrome/browser/sync/engine/syncer_util.h" 9 #include "chrome/browser/sync/engine/syncer_util.h"
10 #include "chrome/browser/sync/protocol/service_constants.h" 10 #include "chrome/browser/sync/protocol/service_constants.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 if (local_entry.Get(IS_DEL) && server_entry.deleted()) 182 if (local_entry.Get(IS_DEL) && server_entry.deleted())
183 return true; 183 return true;
184 if (!ClientAndServerTimeMatch(local_entry.Get(CTIME), server_entry.ctime())) { 184 if (!ClientAndServerTimeMatch(local_entry.Get(CTIME), server_entry.ctime())) {
185 LOG(WARNING) << "ctime mismatch"; 185 LOG(WARNING) << "ctime mismatch";
186 return false; 186 return false;
187 } 187 }
188 188
189 // These checks are somewhat prolix, but they're easier to debug than a big 189 // These checks are somewhat prolix, but they're easier to debug than a big
190 // boolean statement. 190 // boolean statement.
191 PathString client_name = local_entry.Get(syncable::NON_UNIQUE_NAME); 191 string client_name = local_entry.Get(syncable::NON_UNIQUE_NAME);
192 if (client_name != name) { 192 if (client_name != name) {
193 LOG(WARNING) << "Client name mismatch"; 193 LOG(WARNING) << "Client name mismatch";
194 return false; 194 return false;
195 } 195 }
196 if (local_entry.Get(PARENT_ID) != server_entry.parent_id()) { 196 if (local_entry.Get(PARENT_ID) != server_entry.parent_id()) {
197 LOG(WARNING) << "Parent ID mismatch"; 197 LOG(WARNING) << "Parent ID mismatch";
198 return false; 198 return false;
199 } 199 }
200 if (local_entry.Get(IS_DIR) != server_entry.IsFolder()) { 200 if (local_entry.Get(IS_DIR) != server_entry.IsFolder()) {
201 LOG(WARNING) << "Dir field mismatch"; 201 LOG(WARNING) << "Dir field mismatch";
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 const CommitResponse_EntryResponse& entry) { 253 const CommitResponse_EntryResponse& entry) {
254 254
255 if (entry.has_non_unique_name()) { 255 if (entry.has_non_unique_name()) {
256 return entry.non_unique_name(); 256 return entry.non_unique_name();
257 } 257 }
258 258
259 return entry.name(); 259 return entry.name();
260 } 260 }
261 261
262 } // namespace browser_sync 262 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncer.cc ('k') | chrome/browser/sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698