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

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

Issue 10662035: [Sync] Put everything in sync/api into csync namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 8 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_SYNC_GLUE_FAKE_GENERIC_CHANGE_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_FAKE_GENERIC_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_FAKE_GENERIC_CHANGE_PROCESSOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_FAKE_GENERIC_CHANGE_PROCESSOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/sync/glue/generic_change_processor.h" 9 #include "chrome/browser/sync/glue/generic_change_processor.h"
10 10
11 #include "sync/api/sync_error.h" 11 #include "sync/api/sync_error.h"
12 12
13 namespace browser_sync { 13 namespace browser_sync {
14 14
15 // A fake GenericChangeProcessor that can return arbitrary values. 15 // A fake GenericChangeProcessor that can return arbitrary values.
16 class FakeGenericChangeProcessor : public GenericChangeProcessor { 16 class FakeGenericChangeProcessor : public GenericChangeProcessor {
17 public: 17 public:
18 FakeGenericChangeProcessor(); 18 FakeGenericChangeProcessor();
19 virtual ~FakeGenericChangeProcessor(); 19 virtual ~FakeGenericChangeProcessor();
20 20
21 // Setters for GenericChangeProcessor implementation results. 21 // Setters for GenericChangeProcessor implementation results.
22 void set_process_sync_changes_error(const SyncError& error); 22 void set_process_sync_changes_error(const csync::SyncError& error);
23 void set_get_sync_data_for_type_error(const SyncError& error); 23 void set_get_sync_data_for_type_error(const csync::SyncError& error);
24 void set_sync_model_has_user_created_nodes(bool has_nodes); 24 void set_sync_model_has_user_created_nodes(bool has_nodes);
25 void set_sync_model_has_user_created_nodes_success(bool success); 25 void set_sync_model_has_user_created_nodes_success(bool success);
26 void set_crypto_ready_if_necessary(bool crypto_ready); 26 void set_crypto_ready_if_necessary(bool crypto_ready);
27 27
28 // GenericChangeProcessor implementations. 28 // GenericChangeProcessor implementations.
29 virtual SyncError ProcessSyncChanges( 29 virtual csync::SyncError ProcessSyncChanges(
30 const tracked_objects::Location& from_here, 30 const tracked_objects::Location& from_here,
31 const SyncChangeList& change_list) OVERRIDE; 31 const csync::SyncChangeList& change_list) OVERRIDE;
32 virtual SyncError GetSyncDataForType( 32 virtual csync::SyncError GetSyncDataForType(
33 syncable::ModelType type, SyncDataList* current_sync_data) OVERRIDE; 33 syncable::ModelType type,
34 csync::SyncDataList* current_sync_data) OVERRIDE;
34 virtual bool SyncModelHasUserCreatedNodes(syncable::ModelType type, 35 virtual bool SyncModelHasUserCreatedNodes(syncable::ModelType type,
35 bool* has_nodes) OVERRIDE; 36 bool* has_nodes) OVERRIDE;
36 virtual bool CryptoReadyIfNecessary(syncable::ModelType type) OVERRIDE; 37 virtual bool CryptoReadyIfNecessary(syncable::ModelType type) OVERRIDE;
37 38
38 private: 39 private:
39 SyncError process_sync_changes_error_; 40 csync::SyncError process_sync_changes_error_;
40 SyncError get_sync_data_for_type_error_; 41 csync::SyncError get_sync_data_for_type_error_;
41 bool sync_model_has_user_created_nodes_; 42 bool sync_model_has_user_created_nodes_;
42 bool sync_model_has_user_created_nodes_success_; 43 bool sync_model_has_user_created_nodes_success_;
43 bool crypto_ready_if_necessary_; 44 bool crypto_ready_if_necessary_;
44 syncable::ModelType type_; 45 syncable::ModelType type_;
45 }; 46 };
46 47
47 } // namespace browser_sync 48 } // namespace browser_sync
48 49
49 #endif // CHROME_BROWSER_SYNC_GLUE_FAKE_GENERIC_CHANGE_PROCESSOR_H_ 50 #endif // CHROME_BROWSER_SYNC_GLUE_FAKE_GENERIC_CHANGE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/fake_data_type_controller.cc ('k') | chrome/browser/sync/glue/fake_generic_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698