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

Side by Side Diff: components/sync/api/fake_sync_change_processor.h

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Rebase. Created 4 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_SYNC_API_FAKE_SYNC_CHANGE_PROCESSOR_H_ 5 #ifndef COMPONENTS_SYNC_API_FAKE_SYNC_CHANGE_PROCESSOR_H_
6 #define COMPONENTS_SYNC_API_FAKE_SYNC_CHANGE_PROCESSOR_H_ 6 #define COMPONENTS_SYNC_API_FAKE_SYNC_CHANGE_PROCESSOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/sync/api/sync_change_processor.h" 11 #include "components/sync/api/sync_change_processor.h"
12 12
13 namespace syncer { 13 namespace syncer {
14 14
15 class FakeSyncChangeProcessor : public SyncChangeProcessor { 15 class FakeSyncChangeProcessor : public SyncChangeProcessor {
16 public: 16 public:
17 FakeSyncChangeProcessor(); 17 FakeSyncChangeProcessor();
18 ~FakeSyncChangeProcessor() override; 18 ~FakeSyncChangeProcessor() override;
19 19
20 // SyncChangeProcessor implementation. 20 // SyncChangeProcessor implementation.
21 // 21 //
22 // ProcessSyncChanges will accumulate changes in changes() until they are 22 // ProcessSyncChanges will accumulate changes in changes() until they are
23 // cleared. 23 // cleared.
24 syncer::SyncError ProcessSyncChanges( 24 SyncError ProcessSyncChanges(const tracked_objects::Location& from_here,
25 const tracked_objects::Location& from_here, 25 const SyncChangeList& change_list) override;
26 const syncer::SyncChangeList& change_list) override;
27 26
28 // SyncChangeProcessor implementation. 27 // SyncChangeProcessor implementation.
29 // 28 //
30 // Returns data(). 29 // Returns data().
31 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; 30 SyncDataList GetAllSyncData(ModelType type) const override;
32 31
33 // SyncChangeProcessor implementation. 32 // SyncChangeProcessor implementation.
34 // 33 //
35 // Updates context(). 34 // Updates context().
36 syncer::SyncError UpdateDataTypeContext(ModelType type, 35 SyncError UpdateDataTypeContext(ModelType type,
37 ContextRefreshStatus refresh_status, 36 ContextRefreshStatus refresh_status,
38 const std::string& context) override; 37 const std::string& context) override;
39 void AddLocalChangeObserver(syncer::LocalChangeObserver* observer) override; 38 void AddLocalChangeObserver(LocalChangeObserver* observer) override;
40 void RemoveLocalChangeObserver( 39 void RemoveLocalChangeObserver(LocalChangeObserver* observer) override;
41 syncer::LocalChangeObserver* observer) override;
42 40
43 virtual const syncer::SyncChangeList& changes() const; 41 virtual const SyncChangeList& changes() const;
44 virtual syncer::SyncChangeList& changes(); 42 virtual SyncChangeList& changes();
45 43
46 virtual const syncer::SyncDataList& data() const; 44 virtual const SyncDataList& data() const;
47 virtual syncer::SyncDataList& data(); 45 virtual SyncDataList& data();
48 46
49 virtual const std::string& context() const; 47 virtual const std::string& context() const;
50 virtual std::string& context(); 48 virtual std::string& context();
51 49
52 private: 50 private:
53 syncer::SyncChangeList changes_; 51 SyncChangeList changes_;
54 syncer::SyncDataList data_; 52 SyncDataList data_;
55 std::string context_; 53 std::string context_;
56 54
57 DISALLOW_COPY_AND_ASSIGN(FakeSyncChangeProcessor); 55 DISALLOW_COPY_AND_ASSIGN(FakeSyncChangeProcessor);
58 }; 56 };
59 57
60 } // namespace syncer 58 } // namespace syncer
61 59
62 #endif // COMPONENTS_SYNC_API_FAKE_SYNC_CHANGE_PROCESSOR_H_ 60 #endif // COMPONENTS_SYNC_API_FAKE_SYNC_CHANGE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « components/sync/api/fake_model_type_service.cc ('k') | components/sync/api/fake_sync_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698