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

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

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: 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 SyncError ProcessSyncChanges(const tracked_objects::Location& from_here, 24 syncer::SyncError ProcessSyncChanges(
25 const SyncChangeList& change_list) override; 25 const tracked_objects::Location& from_here,
26 const syncer::SyncChangeList& change_list) override;
26 27
27 // SyncChangeProcessor implementation. 28 // SyncChangeProcessor implementation.
28 // 29 //
29 // Returns data(). 30 // Returns data().
30 SyncDataList GetAllSyncData(ModelType type) const override; 31 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override;
31 32
32 // SyncChangeProcessor implementation. 33 // SyncChangeProcessor implementation.
33 // 34 //
34 // Updates context(). 35 // Updates context().
35 SyncError UpdateDataTypeContext(ModelType type, 36 syncer::SyncError UpdateDataTypeContext(ModelType type,
36 ContextRefreshStatus refresh_status, 37 ContextRefreshStatus refresh_status,
37 const std::string& context) override; 38 const std::string& context) override;
38 void AddLocalChangeObserver(LocalChangeObserver* observer) override; 39 void AddLocalChangeObserver(syncer::LocalChangeObserver* observer) override;
39 void RemoveLocalChangeObserver(LocalChangeObserver* observer) override; 40 void RemoveLocalChangeObserver(
41 syncer::LocalChangeObserver* observer) override;
40 42
41 virtual const SyncChangeList& changes() const; 43 virtual const syncer::SyncChangeList& changes() const;
42 virtual SyncChangeList& changes(); 44 virtual syncer::SyncChangeList& changes();
43 45
44 virtual const SyncDataList& data() const; 46 virtual const syncer::SyncDataList& data() const;
45 virtual SyncDataList& data(); 47 virtual syncer::SyncDataList& data();
46 48
47 virtual const std::string& context() const; 49 virtual const std::string& context() const;
48 virtual std::string& context(); 50 virtual std::string& context();
49 51
50 private: 52 private:
51 SyncChangeList changes_; 53 syncer::SyncChangeList changes_;
52 SyncDataList data_; 54 syncer::SyncDataList data_;
53 std::string context_; 55 std::string context_;
54 56
55 DISALLOW_COPY_AND_ASSIGN(FakeSyncChangeProcessor); 57 DISALLOW_COPY_AND_ASSIGN(FakeSyncChangeProcessor);
56 }; 58 };
57 59
58 } // namespace syncer 60 } // namespace syncer
59 61
60 #endif // COMPONENTS_SYNC_API_FAKE_SYNC_CHANGE_PROCESSOR_H_ 62 #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