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

Side by Side Diff: chrome/browser/sync/glue/generic_change_processor_fake.h

Issue 9395058: [Sync] Remove SyncableServiceAdapter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review Created 8 years, 10 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 #ifndef CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_FAKE_H_
6 #define CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_FAKE_H_
7 #pragma once
8
9 #include "chrome/browser/sync/glue/generic_change_processor.h"
10
11 namespace browser_sync {
12
13 // A fake GenericChangeProcessor that can return arbitrary values.
14 class GenericChangeProcessorFake : public GenericChangeProcessor {
15 public:
16 GenericChangeProcessorFake();
17 virtual ~GenericChangeProcessorFake();
18
19 // Reset all the GenericChangeProcessor results.
20 void Reset();
21
22 // Setters for GenericChangeProcessor results.
23 // Return value for ProcessSyncChanges.
24 void set_process_success(bool success);
25 // Return value for GetSyncDataForType.
26 void set_get_sync_data_success(bool success);
27 // Value stored into |has_nodes| for SyncModelHasUserCreatedNodes.
28 void set_has_nodes(bool has_nodes);
29 // Return value for SyncModelHasUserCreatedNodes.
30 void set_has_nodes_success(bool success);
31 // Return value for CryptoReadyIfNecessary.
32 void set_crypto_ready(bool crypto_ready);
33
34 // GenericChangeProcessor implementations.
35 virtual SyncError ProcessSyncChanges(
36 const tracked_objects::Location& from_here,
37 const SyncChangeList& change_list) OVERRIDE;
38 virtual SyncError GetSyncDataForType(
39 syncable::ModelType type, SyncDataList* current_sync_data) OVERRIDE;
40 virtual bool SyncModelHasUserCreatedNodes(syncable::ModelType type,
41 bool* has_nodes) OVERRIDE;
42 virtual bool CryptoReadyIfNecessary(syncable::ModelType type) OVERRIDE;
43
44 private:
45 bool process_success_;
46 bool get_sync_data_success_;
47 bool has_nodes_;
48 bool has_nodes_success_;
49 bool crypto_ready_;
50 syncable::ModelType type_;
51 };
52
53 } // namespace browser_sync
54
55 #endif // CHROME_BROWSER_SYNC_GLUE_GENERIC_CHANGE_PROCESSOR_FAKE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698