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/test/engine/mock_update_handler.cc

Issue 232003005: [Sync] Add support for retrying a getupdates due to a context change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/test/engine/mock_update_handler.h" 5 #include "sync/test/engine/mock_update_handler.h"
6 6
7 #include "sync/internal_api/public/base/model_type.h" 7 #include "sync/internal_api/public/base/model_type.h"
8 8
9 namespace syncer { 9 namespace syncer {
10 10
(...skipping 11 matching lines...) Expand all
22 void MockUpdateHandler::GetDownloadProgress( 22 void MockUpdateHandler::GetDownloadProgress(
23 sync_pb::DataTypeProgressMarker* progress_marker) const { 23 sync_pb::DataTypeProgressMarker* progress_marker) const {
24 progress_marker->CopyFrom(progress_marker_); 24 progress_marker->CopyFrom(progress_marker_);
25 } 25 }
26 26
27 void MockUpdateHandler::GetDataTypeContext( 27 void MockUpdateHandler::GetDataTypeContext(
28 sync_pb::DataTypeContext* context) const { 28 sync_pb::DataTypeContext* context) const {
29 context->Clear(); 29 context->Clear();
30 } 30 }
31 31
32 void MockUpdateHandler::ProcessGetUpdatesResponse( 32 SyncerError MockUpdateHandler::ProcessGetUpdatesResponse(
33 const sync_pb::DataTypeProgressMarker& progress_marker, 33 const sync_pb::DataTypeProgressMarker& progress_marker,
34 const sync_pb::DataTypeContext& mutated_context, 34 const sync_pb::DataTypeContext& mutated_context,
35 const SyncEntityList& applicable_updates, 35 const SyncEntityList& applicable_updates,
36 sessions::StatusController* status) { 36 sessions::StatusController* status) {
37 progress_marker_.CopyFrom(progress_marker); 37 progress_marker_.CopyFrom(progress_marker);
38 return syncer::SYNCER_OK;
38 } 39 }
39 40
40 void MockUpdateHandler::ApplyUpdates(sessions::StatusController* status) { 41 void MockUpdateHandler::ApplyUpdates(sessions::StatusController* status) {
41 apply_updates_count_++; 42 apply_updates_count_++;
42 } 43 }
43 44
44 void MockUpdateHandler::PassiveApplyUpdates( 45 void MockUpdateHandler::PassiveApplyUpdates(
45 sessions::StatusController* status) { 46 sessions::StatusController* status) {
46 passive_apply_updates_count_++; 47 passive_apply_updates_count_++;
47 } 48 }
48 49
49 int MockUpdateHandler::GetApplyUpdatesCount() { 50 int MockUpdateHandler::GetApplyUpdatesCount() {
50 return apply_updates_count_; 51 return apply_updates_count_;
51 } 52 }
52 53
53 int MockUpdateHandler::GetPassiveApplyUpdatesCount() { 54 int MockUpdateHandler::GetPassiveApplyUpdatesCount() {
54 return passive_apply_updates_count_; 55 return passive_apply_updates_count_;
55 } 56 }
56 57
57 } // namespace syncer 58 } // namespace syncer
OLDNEW
« sync/engine/directory_update_handler_unittest.cc ('K') | « sync/test/engine/mock_update_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698