OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef SERVICES_PREFERENCES_PUBLIC_CPP_USER_PREFS_IMPL_H_ |
| 6 #define SERVICES_PREFERENCES_PUBLIC_CPP_USER_PREFS_IMPL_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/strings/string16.h" |
| 14 #include "components/prefs/json_pref_store.h" |
| 15 #include "components/user_prefs/tracked/pref_hash_filter.h" |
| 16 #include "services/preferences/public/interfaces/preferences.mojom.h" |
| 17 |
| 18 namespace base { |
| 19 class FilePath; |
| 20 class SingleThreadTaskRunner; |
| 21 class SequencedTaskRunner; |
| 22 } |
| 23 |
| 24 namespace prefs { |
| 25 |
| 26 // Factory functions for creating backends for user prefs. These are temporary |
| 27 // until the Prefs service provides a mojo interface for initializing user |
| 28 // prefs. |
| 29 // |
| 30 // TODO(sammc): Make these implementation details of the prefs service when it |
| 31 // exists. |
| 32 |
| 33 void CreateUserPrefs( |
| 34 const base::FilePath& pref_filename, |
| 35 const scoped_refptr<base::SingleThreadTaskRunner>& connection_task_runner, |
| 36 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, |
| 37 mojom::PersistentPrefStoreConnectorRequest request); |
| 38 |
| 39 void CreateSegregatedUserPrefs( |
| 40 const base::FilePath& unprotected_pref_filename, |
| 41 const base::FilePath& protected_pref_filename, |
| 42 const std::vector<PrefHashFilter::TrackedPreferenceMetadata>& |
| 43 tracking_configuration, |
| 44 size_t reporting_ids_count, |
| 45 const std::string& seed, |
| 46 const std::string& legacy_device_id, |
| 47 const base::string16& registry_path, |
| 48 base::WeakPtr<TrackedPreferenceValidationDelegate> validation_delegate, |
| 49 const base::Closure& on_reset_on_load, |
| 50 const scoped_refptr<base::SingleThreadTaskRunner>& connection_task_runner, |
| 51 const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, |
| 52 mojom::PersistentPrefStoreConnectorRequest request); |
| 53 |
| 54 } // namespace prefs |
| 55 |
| 56 #endif // SERVICES_PREFERENCES_PUBLIC_CPP_USER_PREFS_IMPL_H_ |
OLD | NEW |