From 500861d63d40323be0559a1d1aa8440f823d51ce Mon Sep 17 00:00:00 2001 From: Adam Roben Date: Thu, 26 Jun 2014 16:25:30 -0400 Subject: [PATCH] Update prefs code for Chrome 35 See https://codereview.chromium.org/64193003 --- brightray/browser/browser_context.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/brightray/browser/browser_context.cc b/brightray/browser/browser_context.cc index 4970530d7bf..cef50925de3 100644 --- a/brightray/browser/browser_context.cc +++ b/brightray/browser/browser_context.cc @@ -16,7 +16,7 @@ #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_builder.h" +#include "base/prefs/pref_service_factory.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/resource_context.h" #include "content/public/browser/storage_partition.h" @@ -76,8 +76,8 @@ void BrowserContext::Initialize() { path_ = path.Append(base::FilePath::FromUTF8Unsafe(GetApplicationName())); auto prefs_path = GetPath().Append(FILE_PATH_LITERAL("Preferences")); - PrefServiceBuilder builder; - builder.WithUserFilePrefs(prefs_path, + base::PrefServiceFactory prefs_factory; + prefs_factory.SetUserPrefsFile(prefs_path, JsonPrefStore::GetTaskRunnerForFile( prefs_path, content::BrowserThread::GetBlockingPool())); @@ -85,7 +85,7 @@ void BrowserContext::Initialize() { RegisterInternalPrefs(registry); RegisterPrefs(registry); - prefs_.reset(builder.Create(registry)); + prefs_ = prefs_factory.Create(registry); } BrowserContext::~BrowserContext() {