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 27 matching lines...) Expand all Loading... |
38 public base::NonThreadSafe { | 38 public base::NonThreadSafe { |
39 public: | 39 public: |
40 explicit PrefModelAssociator(syncer::ModelType type); | 40 explicit PrefModelAssociator(syncer::ModelType type); |
41 virtual ~PrefModelAssociator(); | 41 virtual ~PrefModelAssociator(); |
42 | 42 |
43 // See description above field for details. | 43 // See description above field for details. |
44 bool models_associated() const { return models_associated_; } | 44 bool models_associated() const { return models_associated_; } |
45 | 45 |
46 // syncer::SyncableService implementation. | 46 // syncer::SyncableService implementation. |
47 virtual syncer::SyncDataList GetAllSyncData( | 47 virtual syncer::SyncDataList GetAllSyncData( |
48 syncer::ModelType type) const OVERRIDE; | 48 syncer::ModelType type) const override; |
49 virtual syncer::SyncError ProcessSyncChanges( | 49 virtual syncer::SyncError ProcessSyncChanges( |
50 const tracked_objects::Location& from_here, | 50 const tracked_objects::Location& from_here, |
51 const syncer::SyncChangeList& change_list) OVERRIDE; | 51 const syncer::SyncChangeList& change_list) override; |
52 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( | 52 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( |
53 syncer::ModelType type, | 53 syncer::ModelType type, |
54 const syncer::SyncDataList& initial_sync_data, | 54 const syncer::SyncDataList& initial_sync_data, |
55 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 55 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
56 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE; | 56 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) override; |
57 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; | 57 virtual void StopSyncing(syncer::ModelType type) override; |
58 | 58 |
59 // Returns the list of preference names that are registered as syncable, and | 59 // Returns the list of preference names that are registered as syncable, and |
60 // hence should be monitored for changes. | 60 // hence should be monitored for changes. |
61 std::set<std::string> registered_preferences() const; | 61 std::set<std::string> registered_preferences() const; |
62 | 62 |
63 // Register a preference with the specified name for syncing. We do not care | 63 // Register a preference with the specified name for syncing. We do not care |
64 // about the type at registration time, but when changes arrive from the | 64 // about the type at registration time, but when changes arrive from the |
65 // syncer, we check if they can be applied and if not drop them. | 65 // syncer, we check if they can be applied and if not drop them. |
66 // Note: This should only be called at profile startup time (before sync | 66 // Note: This should only be called at profile startup time (before sync |
67 // begins). | 67 // begins). |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 SyncedPrefObserverMap; | 185 SyncedPrefObserverMap; |
186 | 186 |
187 void NotifySyncedPrefObservers(const std::string& path, bool from_sync) const; | 187 void NotifySyncedPrefObservers(const std::string& path, bool from_sync) const; |
188 | 188 |
189 SyncedPrefObserverMap synced_pref_observers_; | 189 SyncedPrefObserverMap synced_pref_observers_; |
190 | 190 |
191 DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator); | 191 DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator); |
192 }; | 192 }; |
193 | 193 |
194 #endif // CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ | 194 #endif // CHROME_BROWSER_PREFS_PREF_MODEL_ASSOCIATOR_H_ |
OLD | NEW |