 Chromium Code Reviews
 Chromium Code Reviews Issue 2601873002:
  Add a mojo bridge for PersistentPrefStore.  (Closed)
    
  
    Issue 2601873002:
  Add a mojo bridge for PersistentPrefStore.  (Closed) 
  | Index: services/preferences/public/cpp/user_prefs_impl.h | 
| diff --git a/services/preferences/public/cpp/user_prefs_impl.h b/services/preferences/public/cpp/user_prefs_impl.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..dd5d2cbfb3e6a44a78ac1ab7b2c5e574fbb1b514 | 
| --- /dev/null | 
| +++ b/services/preferences/public/cpp/user_prefs_impl.h | 
| @@ -0,0 +1,55 @@ | 
| +// Copyright 2017 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#ifndef SERVICES_PREFERENCES_PUBLIC_CPP_USER_PREFS_IMPL_H_ | 
| +#define SERVICES_PREFERENCES_PUBLIC_CPP_USER_PREFS_IMPL_H_ | 
| + | 
| +#include <string> | 
| +#include <vector> | 
| + | 
| +#include "base/memory/ref_counted.h" | 
| +#include "base/strings/string16.h" | 
| +#include "components/user_prefs/tracked/pref_hash_filter.h" | 
| +#include "services/preferences/public/interfaces/preferences.mojom.h" | 
| +#include "services/preferences/public/interfaces/tracked_preference_validation_delegate.mojom.h" | 
| + | 
| +namespace base { | 
| +class FilePath; | 
| +class SingleThreadTaskRunner; | 
| +class SequencedTaskRunner; | 
| +} | 
| + | 
| +namespace prefs { | 
| + | 
| +// Factory functions for creating backends for user prefs. These are temporary | 
| +// until the Prefs service provides a mojo interface for initializing user | 
| +// prefs. | 
| +// | 
| +// TODO(sammc): Make these implementation details of the prefs service when it | 
| +// exists. | 
| + | 
| +void CreateUserPrefs( | 
| 
tibell
2017/03/08 03:39:54
Both these functions, even if temporary, could use
 | 
| + const base::FilePath& pref_filename, | 
| + const scoped_refptr<base::SingleThreadTaskRunner>& connection_task_runner, | 
| + const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, | 
| + mojom::PersistentPrefStoreConnectorRequest request); | 
| + | 
| +void CreateSegregatedUserPrefs( | 
| + const base::FilePath& unprotected_pref_filename, | 
| + const base::FilePath& protected_pref_filename, | 
| + const std::vector<PrefHashFilter::TrackedPreferenceMetadata>& | 
| + tracking_configuration, | 
| + size_t reporting_ids_count, | 
| + const std::string& seed, | 
| + const std::string& legacy_device_id, | 
| + const base::string16& registry_path, | 
| + mojom::TrackedPreferenceValidationDelegatePtr validation_delegate, | 
| + const base::Closure& on_reset_on_load, | 
| + const scoped_refptr<base::SingleThreadTaskRunner>& connection_task_runner, | 
| + const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, | 
| + mojom::PersistentPrefStoreConnectorRequest request); | 
| + | 
| +} // namespace prefs | 
| + | 
| +#endif // SERVICES_PREFERENCES_PUBLIC_CPP_USER_PREFS_IMPL_H_ |