| 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 COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ | 6 #define COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> |
| 11 #include <string> | 12 #include <string> |
| 12 | 13 |
| 13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" | 15 #include "base/macros.h" |
| 15 #include "base/memory/scoped_ptr.h" | |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
| 18 #include "base/threading/non_thread_safe.h" | 18 #include "base/threading/non_thread_safe.h" |
| 19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
| 21 #include "components/prefs/pref_member.h" | 21 #include "components/prefs/pref_member.h" |
| 22 #include "sync/internal_api/public/base/model_type.h" | 22 #include "sync/internal_api/public/base/model_type.h" |
| 23 #include "sync/internal_api/public/sync_encryption_handler.h" | 23 #include "sync/internal_api/public/sync_encryption_handler.h" |
| 24 | 24 |
| 25 class PrefService; | 25 class PrefService; |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 // Get/set for flag indicating that passphrase encryption transition is in | 173 // Get/set for flag indicating that passphrase encryption transition is in |
| 174 // progress. | 174 // progress. |
| 175 void SetPassphraseEncryptionTransitionInProgress(bool value); | 175 void SetPassphraseEncryptionTransitionInProgress(bool value); |
| 176 bool GetPassphraseEncryptionTransitionInProgress() const; | 176 bool GetPassphraseEncryptionTransitionInProgress() const; |
| 177 | 177 |
| 178 // Get/set for saved Nigori state that needs to be passed to backend | 178 // Get/set for saved Nigori state that needs to be passed to backend |
| 179 // initialization after transition. | 179 // initialization after transition. |
| 180 void SetSavedNigoriStateForPassphraseEncryptionTransition( | 180 void SetSavedNigoriStateForPassphraseEncryptionTransition( |
| 181 const syncer::SyncEncryptionHandler::NigoriState& nigori_state); | 181 const syncer::SyncEncryptionHandler::NigoriState& nigori_state); |
| 182 scoped_ptr<syncer::SyncEncryptionHandler::NigoriState> | 182 std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState> |
| 183 GetSavedNigoriStateForPassphraseEncryptionTransition() const; | 183 GetSavedNigoriStateForPassphraseEncryptionTransition() const; |
| 184 | 184 |
| 185 private: | 185 private: |
| 186 void RegisterPrefGroups(); | 186 void RegisterPrefGroups(); |
| 187 | 187 |
| 188 static void RegisterDataTypePreferredPref( | 188 static void RegisterDataTypePreferredPref( |
| 189 user_prefs::PrefRegistrySyncable* prefs, | 189 user_prefs::PrefRegistrySyncable* prefs, |
| 190 syncer::ModelType type, | 190 syncer::ModelType type, |
| 191 bool is_preferred); | 191 bool is_preferred); |
| 192 bool GetDataTypePreferred(syncer::ModelType type) const; | 192 bool GetDataTypePreferred(syncer::ModelType type) const; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 217 // etc. | 217 // etc. |
| 218 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; | 218 typedef std::map<syncer::ModelType, syncer::ModelTypeSet> PrefGroupsMap; |
| 219 PrefGroupsMap pref_groups_; | 219 PrefGroupsMap pref_groups_; |
| 220 | 220 |
| 221 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); | 221 DISALLOW_COPY_AND_ASSIGN(SyncPrefs); |
| 222 }; | 222 }; |
| 223 | 223 |
| 224 } // namespace sync_driver | 224 } // namespace sync_driver |
| 225 | 225 |
| 226 #endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ | 226 #endif // COMPONENTS_SYNC_DRIVER_SYNC_PREFS_H_ |
| OLD | NEW |