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

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

Issue 553015: Support for multiple sync ModelSafeWorkers.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 5
6 #include "chrome/browser/sync/engine/verify_updates_command.h" 6 #include "chrome/browser/sync/engine/verify_updates_command.h"
7 7
8 #include "chrome/browser/sync/engine/syncer.h" 8 #include "chrome/browser/sync/engine/syncer.h"
9 #include "chrome/browser/sync/engine/syncer_proto_util.h" 9 #include "chrome/browser/sync/engine/syncer_proto_util.h"
10 #include "chrome/browser/sync/engine/syncer_types.h" 10 #include "chrome/browser/sync/engine/syncer_types.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 } 54 }
55 55
56 VerifyResult VerifyUpdatesCommand::VerifyUpdate( 56 VerifyResult VerifyUpdatesCommand::VerifyUpdate(
57 syncable::WriteTransaction* trans, const SyncEntity& entry) { 57 syncable::WriteTransaction* trans, const SyncEntity& entry) {
58 syncable::Id id = entry.id(); 58 syncable::Id id = entry.id();
59 59
60 const bool deleted = entry.has_deleted() && entry.deleted(); 60 const bool deleted = entry.has_deleted() && entry.deleted();
61 const bool is_directory = entry.IsFolder(); 61 const bool is_directory = entry.IsFolder();
62 const bool is_bookmark = 62 const bool is_bookmark =
63 SyncerUtil::GetSyncDataType(entry) == SYNC_TYPE_BOOKMARK; 63 SyncerUtil::GetModelType(entry) == syncable::BOOKMARKS;
64 64
65 if (!id.ServerKnows()) { 65 if (!id.ServerKnows()) {
66 LOG(ERROR) << "Illegal negative id in received updates"; 66 LOG(ERROR) << "Illegal negative id in received updates";
67 return VERIFY_FAIL; 67 return VERIFY_FAIL;
68 } 68 }
69 if (!entry.parent_id().ServerKnows()) { 69 if (!entry.parent_id().ServerKnows()) {
70 LOG(ERROR) << "Illegal parent id in received updates"; 70 LOG(ERROR) << "Illegal parent id in received updates";
71 return VERIFY_FAIL; 71 return VERIFY_FAIL;
72 } 72 }
73 { 73 {
(...skipping 20 matching lines...) Expand all
94 deleted, is_directory, is_bookmark); 94 deleted, is_directory, is_bookmark);
95 } 95 }
96 96
97 if (VERIFY_UNDECIDED == result) 97 if (VERIFY_UNDECIDED == result)
98 return VERIFY_SUCCESS; // No news is good news. 98 return VERIFY_SUCCESS; // No news is good news.
99 else 99 else
100 return result; // This might be VERIFY_SUCCESS as well 100 return result; // This might be VERIFY_SUCCESS as well
101 } 101 }
102 102
103 } // namespace browser_sync 103 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncer_util.cc ('k') | chrome/browser/sync/glue/bookmark_model_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698