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

Side by Side Diff: chrome/browser/sync/glue/fake_generic_change_processor.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
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_FAKE_GENERIC_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_FAKE_GENERIC_CHANGE_PROCESSOR_H_
7 #pragma once
8
9 #include "chrome/browser/sync/glue/generic_change_processor.h"
10
11 #include "chrome/browser/sync/api/sync_error.h"
12
13 namespace browser_sync {
14
15 // A fake GenericChangeProcessor that can return arbitrary values.
16 class FakeGenericChangeProcessor : public GenericChangeProcessor {
17 public:
18 FakeGenericChangeProcessor();
19 virtual ~FakeGenericChangeProcessor();
20
21 // Setters for GenericChangeProcessor implementation results.
22 void set_process_sync_changes_error(const SyncError& error);
23 void set_get_sync_data_for_type_error(const SyncError& error);
24 void set_sync_model_has_user_created_nodes(bool has_nodes);
25 void set_sync_model_has_user_created_nodes_success(bool success);
26 void set_crypto_ready_if_necessary(bool crypto_ready);
27
28 // GenericChangeProcessor implementations.
29 virtual SyncError ProcessSyncChanges(
30 const tracked_objects::Location& from_here,
31 const SyncChangeList& change_list) OVERRIDE;
32 virtual SyncError GetSyncDataForType(
33 syncable::ModelType type, SyncDataList* current_sync_data) OVERRIDE;
34 virtual bool SyncModelHasUserCreatedNodes(syncable::ModelType type,
35 bool* has_nodes) OVERRIDE;
36 virtual bool CryptoReadyIfNecessary(syncable::ModelType type) OVERRIDE;
37
38 private:
39 SyncError process_sync_changes_error_;
40 SyncError get_sync_data_for_type_error_;
41 bool sync_model_has_user_created_nodes_;
42 bool sync_model_has_user_created_nodes_success_;
43 bool crypto_ready_if_necessary_;
44 syncable::ModelType type_;
45 };
46
47 } // namespace browser_sync
48
49 #endif // CHROME_BROWSER_SYNC_GLUE_FAKE_GENERIC_CHANGE_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698