Update to new pref service location in components
This commit is contained in:
parent
f9dfa5466d
commit
f8f97687dc
2 changed files with 12 additions and 8 deletions
|
@ -13,10 +13,12 @@
|
||||||
|
|
||||||
#include "base/files/file_path.h"
|
#include "base/files/file_path.h"
|
||||||
#include "base/path_service.h"
|
#include "base/path_service.h"
|
||||||
#include "base/prefs/json_pref_store.h"
|
|
||||||
#include "base/prefs/pref_registry_simple.h"
|
#include "components/prefs/json_pref_store.h"
|
||||||
#include "base/prefs/pref_service.h"
|
#include "components/prefs/pref_registry_simple.h"
|
||||||
#include "base/prefs/pref_service_factory.h"
|
#include "components/prefs/pref_service.h"
|
||||||
|
#include "components/prefs/pref_service_factory.h"
|
||||||
|
|
||||||
#include "base/strings/string_util.h"
|
#include "base/strings/string_util.h"
|
||||||
#include "content/public/browser/browser_thread.h"
|
#include "content/public/browser/browser_thread.h"
|
||||||
#include "content/public/browser/resource_context.h"
|
#include "content/public/browser/resource_context.h"
|
||||||
|
@ -112,7 +114,7 @@ BrowserContext::BrowserContext(const std::string& partition, bool in_memory)
|
||||||
|
|
||||||
void BrowserContext::InitPrefs() {
|
void BrowserContext::InitPrefs() {
|
||||||
auto prefs_path = GetPath().Append(FILE_PATH_LITERAL("Preferences"));
|
auto prefs_path = GetPath().Append(FILE_PATH_LITERAL("Preferences"));
|
||||||
base::PrefServiceFactory prefs_factory;
|
PrefServiceFactory prefs_factory;
|
||||||
prefs_factory.SetUserPrefsFile(prefs_path,
|
prefs_factory.SetUserPrefsFile(prefs_path,
|
||||||
JsonPrefStore::GetTaskRunnerForFile(
|
JsonPrefStore::GetTaskRunnerForFile(
|
||||||
prefs_path, BrowserThread::GetBlockingPool()).get());
|
prefs_path, BrowserThread::GetBlockingPool()).get());
|
||||||
|
|
|
@ -15,9 +15,11 @@
|
||||||
#include "base/json/json_reader.h"
|
#include "base/json/json_reader.h"
|
||||||
#include "base/json/json_writer.h"
|
#include "base/json/json_writer.h"
|
||||||
#include "base/metrics/histogram.h"
|
#include "base/metrics/histogram.h"
|
||||||
#include "base/prefs/pref_registry_simple.h"
|
|
||||||
#include "base/prefs/pref_service.h"
|
#include "components/prefs/pref_service.h"
|
||||||
#include "base/prefs/scoped_user_pref_update.h"
|
#include "components/prefs/scoped_user_pref_update.h"
|
||||||
|
#include "components/prefs/pref_registry_simple.h"
|
||||||
|
|
||||||
#include "base/strings/pattern.h"
|
#include "base/strings/pattern.h"
|
||||||
#include "base/strings/stringprintf.h"
|
#include "base/strings/stringprintf.h"
|
||||||
#include "base/strings/utf_string_conversions.h"
|
#include "base/strings/utf_string_conversions.h"
|
||||||
|
|
Loading…
Reference in a new issue