Update to new pref service location in components

This commit is contained in:
Brian R. Bondy 2016-04-26 22:12:52 -04:00 committed by Cheng Zhao
parent f9dfa5466d
commit f8f97687dc
2 changed files with 12 additions and 8 deletions

View file

@ -13,10 +13,12 @@
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "base/prefs/json_pref_store.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/pref_service_factory.h"
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/pref_service_factory.h"
#include "base/strings/string_util.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/resource_context.h"
@ -112,7 +114,7 @@ BrowserContext::BrowserContext(const std::string& partition, bool in_memory)
void BrowserContext::InitPrefs() {
auto prefs_path = GetPath().Append(FILE_PATH_LITERAL("Preferences"));
base::PrefServiceFactory prefs_factory;
PrefServiceFactory prefs_factory;
prefs_factory.SetUserPrefsFile(prefs_path,
JsonPrefStore::GetTaskRunnerForFile(
prefs_path, BrowserThread::GetBlockingPool()).get());

View file

@ -15,9 +15,11 @@
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/metrics/histogram.h"
#include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h"
#include "base/prefs/scoped_user_pref_update.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/prefs/pref_registry_simple.h"
#include "base/strings/pattern.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"