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

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

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
« no previous file with comments | « no previous file | chrome/browser/sync/api/fake_syncable_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_SYNC_API_FAKE_SYNCABLE_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_API_FAKE_SYNCABLE_SERVICE_H_
7 #pragma once
8
9 #include "chrome/browser/sync/api/syncable_service.h"
10
11 // A fake SyncableService that can return arbitrary values and maintains the
12 // syncing status.
13 class FakeSyncableService : public SyncableService {
14 public:
15 FakeSyncableService();
16 virtual ~FakeSyncableService();
17
18 // Setters for SyncableService implementation results.
19 void set_merge_data_and_start_syncing_error(const SyncError& error);
20 void set_process_sync_changes_error(const SyncError& error);
21
22 // Whether we're syncing or not. Set on a successful MergeDataAndStartSyncing,
23 // unset on StopSyncing. False by default.
24 bool syncing() const;
25
26 // SyncableService implementation.
27 virtual SyncError MergeDataAndStartSyncing(
28 syncable::ModelType type,
29 const SyncDataList& initial_sync_data,
30 SyncChangeProcessor* sync_processor) OVERRIDE;
31 virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
32 virtual SyncDataList GetAllSyncData(syncable::ModelType type) const OVERRIDE;
33 virtual SyncError ProcessSyncChanges(
34 const tracked_objects::Location& from_here,
35 const SyncChangeList& change_list) OVERRIDE;
36
37 private:
38 scoped_ptr<SyncChangeProcessor> sync_processor_;
39 SyncError merge_data_and_start_syncing_error_;
40 SyncError process_sync_changes_error_;
41 bool syncing_;
42 syncable::ModelType type_;
43 };
44
45 #endif // CHROME_BROWSER_SYNC_API_FAKE_SYNCABLE_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/api/fake_syncable_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698