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

Side by Side Diff: chrome/browser/sync/api/fake_syncable_service.cc

Issue 9395058: [Sync] Remove SyncableServiceAdapter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/sync/api/fake_syncable_service.h"
6
7 #include "base/location.h"
8
9 FakeSyncableService::FakeSyncableService()
10 : syncing_(false),
11 type_(syncable::UNSPECIFIED) {}
12
13 FakeSyncableService::~FakeSyncableService() {}
14
15 void FakeSyncableService::set_merge_data_and_start_syncing_error(
16 const SyncError& error) {
17 merge_data_and_start_syncing_error_ = error;
18 }
19
20 void FakeSyncableService::set_process_sync_changes_error(
21 const SyncError& error) {
22 process_sync_changes_error_ = error;
23 }
24
25 bool FakeSyncableService::syncing() const {
26 return syncing_;
27 }
28
29 // SyncableService implementation.
30 SyncError FakeSyncableService::MergeDataAndStartSyncing(
31 syncable::ModelType type,
32 const SyncDataList& initial_sync_data,
33 SyncChangeProcessor* sync_processor) {
34 sync_processor_.reset(sync_processor);
35 type_ = type;
36 if (!merge_data_and_start_syncing_error_.IsSet()) {
37 syncing_ = true;
38 }
39 return merge_data_and_start_syncing_error_;
40 }
41
42 void FakeSyncableService::StopSyncing(syncable::ModelType type) {
43 syncing_ = false;
44 }
45
46 SyncDataList FakeSyncableService::GetAllSyncData(
47 syncable::ModelType type) const {
48 return SyncDataList();
49 }
50
51 SyncError FakeSyncableService::ProcessSyncChanges(
52 const tracked_objects::Location& from_here,
53 const SyncChangeList& change_list) {
54 return process_sync_changes_error_;
55 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/api/fake_syncable_service.h ('k') | chrome/browser/sync/glue/app_notification_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698