Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(649)

Unified Diff: services/preferences/public/cpp/user_prefs_impl.h

Issue 2601873002: Add a mojo bridge for PersistentPrefStore. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..174db6d441b87f205688ce5f94927845e2661d24
--- /dev/null
+++ b/services/preferences/public/cpp/user_prefs_impl.h
@@ -0,0 +1,56 @@
+// 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/memory/weak_ptr.h"
+#include "base/strings/string16.h"
+#include "components/prefs/json_pref_store.h"
+#include "components/user_prefs/tracked/pref_hash_filter.h"
+#include "services/preferences/public/interfaces/preferences.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(
+ 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,
+ base::WeakPtr<TrackedPreferenceValidationDelegate> 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_

Powered by Google App Engine
This is Rietveld 408576698