Update prefs code for Chrome 35
See https://codereview.chromium.org/64193003
This commit is contained in:
parent
202f7bcd41
commit
500861d63d
1 changed files with 4 additions and 4 deletions
|
@ -16,7 +16,7 @@
|
||||||
#include "base/prefs/json_pref_store.h"
|
#include "base/prefs/json_pref_store.h"
|
||||||
#include "base/prefs/pref_registry_simple.h"
|
#include "base/prefs/pref_registry_simple.h"
|
||||||
#include "base/prefs/pref_service.h"
|
#include "base/prefs/pref_service.h"
|
||||||
#include "base/prefs/pref_service_builder.h"
|
#include "base/prefs/pref_service_factory.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"
|
||||||
#include "content/public/browser/storage_partition.h"
|
#include "content/public/browser/storage_partition.h"
|
||||||
|
@ -76,8 +76,8 @@ void BrowserContext::Initialize() {
|
||||||
path_ = path.Append(base::FilePath::FromUTF8Unsafe(GetApplicationName()));
|
path_ = path.Append(base::FilePath::FromUTF8Unsafe(GetApplicationName()));
|
||||||
|
|
||||||
auto prefs_path = GetPath().Append(FILE_PATH_LITERAL("Preferences"));
|
auto prefs_path = GetPath().Append(FILE_PATH_LITERAL("Preferences"));
|
||||||
PrefServiceBuilder builder;
|
base::PrefServiceFactory prefs_factory;
|
||||||
builder.WithUserFilePrefs(prefs_path,
|
prefs_factory.SetUserPrefsFile(prefs_path,
|
||||||
JsonPrefStore::GetTaskRunnerForFile(
|
JsonPrefStore::GetTaskRunnerForFile(
|
||||||
prefs_path, content::BrowserThread::GetBlockingPool()));
|
prefs_path, content::BrowserThread::GetBlockingPool()));
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ void BrowserContext::Initialize() {
|
||||||
RegisterInternalPrefs(registry);
|
RegisterInternalPrefs(registry);
|
||||||
RegisterPrefs(registry);
|
RegisterPrefs(registry);
|
||||||
|
|
||||||
prefs_.reset(builder.Create(registry));
|
prefs_ = prefs_factory.Create(registry);
|
||||||
}
|
}
|
||||||
|
|
||||||
BrowserContext::~BrowserContext() {
|
BrowserContext::~BrowserContext() {
|
||||||
|
|
Loading…
Reference in a new issue