OLD | NEW |
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_PREFS_PREF_MODEL_ASSOCIATOR_H_ | 5 #ifndef CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ |
6 #define CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ | 6 #define CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 16 matching lines...) Expand all Loading... |
27 // Contains all preference sync related logic. | 27 // Contains all preference sync related logic. |
28 // TODO(sync): Merge this into PrefService once we separate the profile | 28 // TODO(sync): Merge this into PrefService once we separate the profile |
29 // PrefService from the local state PrefService. | 29 // PrefService from the local state PrefService. |
30 class PrefModelAssociator | 30 class PrefModelAssociator |
31 : public syncer::SyncableService, | 31 : public syncer::SyncableService, |
32 public base::NonThreadSafe { | 32 public base::NonThreadSafe { |
33 public: | 33 public: |
34 PrefModelAssociator(); | 34 PrefModelAssociator(); |
35 virtual ~PrefModelAssociator(); | 35 virtual ~PrefModelAssociator(); |
36 | 36 |
| 37 // See description above field for details. |
| 38 bool models_associated() const { return models_associated_; } |
| 39 |
37 // syncer::SyncableService implementation. | 40 // syncer::SyncableService implementation. |
38 virtual syncer::SyncDataList GetAllSyncData( | 41 virtual syncer::SyncDataList GetAllSyncData( |
39 syncer::ModelType type) const OVERRIDE; | 42 syncer::ModelType type) const OVERRIDE; |
40 virtual syncer::SyncError ProcessSyncChanges( | 43 virtual syncer::SyncError ProcessSyncChanges( |
41 const tracked_objects::Location& from_here, | 44 const tracked_objects::Location& from_here, |
42 const syncer::SyncChangeList& change_list) OVERRIDE; | 45 const syncer::SyncChangeList& change_list) OVERRIDE; |
43 virtual syncer::SyncError MergeDataAndStartSyncing( | 46 virtual syncer::SyncError MergeDataAndStartSyncing( |
44 syncer::ModelType type, | 47 syncer::ModelType type, |
45 const syncer::SyncDataList& initial_sync_data, | 48 const syncer::SyncDataList& initial_sync_data, |
46 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 49 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // Sync's syncer::SyncChange handler. We push all our changes through this. | 147 // Sync's syncer::SyncChange handler. We push all our changes through this. |
145 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_; | 148 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_; |
146 | 149 |
147 // Sync's error handler. We use this to create sync errors. | 150 // Sync's error handler. We use this to create sync errors. |
148 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_; | 151 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_; |
149 | 152 |
150 DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator); | 153 DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator); |
151 }; | 154 }; |
152 | 155 |
153 #endif // CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ | 156 #endif // CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ |
OLD | NEW |