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

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

Issue 6104003: sync: use progress markers instead of timestamps during GetUpdates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tim's fixes Created 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const SyncEntity& update = 45 const SyncEntity& update =
46 *reinterpret_cast<const SyncEntity *>(&(updates.entries(i))); 46 *reinterpret_cast<const SyncEntity *>(&(updates.entries(i)));
47 ModelSafeGroup g = GetGroupForModelType(update.GetModelType(), 47 ModelSafeGroup g = GetGroupForModelType(update.GetModelType(),
48 session->routing_info()); 48 session->routing_info());
49 if (g != status->group_restriction()) 49 if (g != status->group_restriction())
50 continue; 50 continue;
51 51
52 VerifyUpdateResult result = VerifyUpdate(&trans, update, 52 VerifyUpdateResult result = VerifyUpdate(&trans, update,
53 session->routing_info()); 53 session->routing_info());
54 status->mutable_update_progress()->AddVerifyResult(result.value, update); 54 status->mutable_update_progress()->AddVerifyResult(result.value, update);
55 status->increment_num_updates_downloaded_by(1);
56 if (update.deleted())
57 status->increment_num_tombstone_updates_downloaded_by(1);
55 } 58 }
56 } 59 }
57 60
58 namespace { 61 namespace {
59 // In the event that IDs match, but tags differ AttemptReuniteClient tag 62 // In the event that IDs match, but tags differ AttemptReuniteClient tag
60 // will have refused to unify the update. 63 // will have refused to unify the update.
61 // We should not attempt to apply it at all since it violates consistency 64 // We should not attempt to apply it at all since it violates consistency
62 // rules. 65 // rules.
63 VerifyResult VerifyTagConsistency(const SyncEntity& entry, 66 VerifyResult VerifyTagConsistency(const SyncEntity& entry,
64 const syncable::MutableEntry& same_id) { 67 const syncable::MutableEntry& same_id) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 deleted, is_directory, model_type); 119 deleted, is_directory, model_type);
117 } 120 }
118 121
119 if (VERIFY_UNDECIDED == result.value) 122 if (VERIFY_UNDECIDED == result.value)
120 result.value = VERIFY_SUCCESS; // No news is good news. 123 result.value = VERIFY_SUCCESS; // No news is good news.
121 124
122 return result; // This might be VERIFY_SUCCESS as well 125 return result; // This might be VERIFY_SUCCESS as well
123 } 126 }
124 127
125 } // namespace browser_sync 128 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncer_unittest.cc ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698