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

Side by Side Diff: components/sync/model/sync_change_processor.h

Issue 2689773002: [Sync] Replace typedef with using. (Closed)
Patch Set: [Sync] Replace typedef with using. Created 3 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
« no previous file with comments | « components/sync/model/string_ordinal.h ('k') | components/sync/model/sync_change_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 COMPONENTS_SYNC_MODEL_SYNC_CHANGE_PROCESSOR_H_ 5 #ifndef COMPONENTS_SYNC_MODEL_SYNC_CHANGE_PROCESSOR_H_
6 #define COMPONENTS_SYNC_MODEL_SYNC_CHANGE_PROCESSOR_H_ 6 #define COMPONENTS_SYNC_MODEL_SYNC_CHANGE_PROCESSOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "components/sync/base/model_type.h" 11 #include "components/sync/base/model_type.h"
12 #include "components/sync/model/sync_data.h" 12 #include "components/sync/model/sync_data.h"
13 #include "components/sync/model/sync_error.h" 13 #include "components/sync/model/sync_error.h"
14 14
15 namespace tracked_objects { 15 namespace tracked_objects {
16 class Location; 16 class Location;
17 } // namespace tracked_objects 17 } // namespace tracked_objects
18 18
19 namespace syncer { 19 namespace syncer {
20 20
21 class SyncChange; 21 class SyncChange;
22 22
23 class LocalChangeObserver; 23 class LocalChangeObserver;
24 24
25 typedef std::vector<SyncChange> SyncChangeList; 25 using SyncChangeList = std::vector<SyncChange>;
26 26
27 // An interface for services that handle receiving SyncChanges. 27 // An interface for services that handle receiving SyncChanges.
28 class SyncChangeProcessor { 28 class SyncChangeProcessor {
29 public: 29 public:
30 // Whether a context change should force a datatype refresh or not. 30 // Whether a context change should force a datatype refresh or not.
31 enum ContextRefreshStatus { NO_REFRESH, REFRESH_NEEDED }; 31 enum ContextRefreshStatus { NO_REFRESH, REFRESH_NEEDED };
32 typedef base::Callback<void(const SyncData&)> GetSyncDataCallback; 32 using GetSyncDataCallback = base::Callback<void(const SyncData&)>;
33 33
34 SyncChangeProcessor(); 34 SyncChangeProcessor();
35 virtual ~SyncChangeProcessor(); 35 virtual ~SyncChangeProcessor();
36 36
37 // Process a list of SyncChanges. 37 // Process a list of SyncChanges.
38 // Returns: A default SyncError (IsSet() == false) if no errors were 38 // Returns: A default SyncError (IsSet() == false) if no errors were
39 // encountered, and a filled SyncError (IsSet() == true) 39 // encountered, and a filled SyncError (IsSet() == true)
40 // otherwise. 40 // otherwise.
41 // Inputs: 41 // Inputs:
42 // |from_here|: allows tracking of where sync changes originate. 42 // |from_here|: allows tracking of where sync changes originate.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Adds an observer of local sync changes. This observer is notified when 80 // Adds an observer of local sync changes. This observer is notified when
81 // local sync changes are applied by GenericChangeProcessor. observer is 81 // local sync changes are applied by GenericChangeProcessor. observer is
82 // not owned by the SyncChangeProcessor. 82 // not owned by the SyncChangeProcessor.
83 virtual void AddLocalChangeObserver(LocalChangeObserver* observer); 83 virtual void AddLocalChangeObserver(LocalChangeObserver* observer);
84 virtual void RemoveLocalChangeObserver(LocalChangeObserver* observer); 84 virtual void RemoveLocalChangeObserver(LocalChangeObserver* observer);
85 }; 85 };
86 86
87 } // namespace syncer 87 } // namespace syncer
88 88
89 #endif // COMPONENTS_SYNC_MODEL_SYNC_CHANGE_PROCESSOR_H_ 89 #endif // COMPONENTS_SYNC_MODEL_SYNC_CHANGE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « components/sync/model/string_ordinal.h ('k') | components/sync/model/sync_change_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698