Commit 6898e587 authored by droger's avatar droger Committed by Commit bot

[iOS] Remove support for asynchronous pref creation

Review URL: https://codereview.chromium.org/1467143002

Cr-Commit-Position: refs/heads/master@{#361093}
parent d0562a5b
......@@ -198,7 +198,7 @@ void ApplicationContextImpl::CreateLocalState() {
RegisterLocalStatePrefs(pref_registry.get());
local_state_ = ::CreateLocalState(
local_state_path, local_state_task_runner_.get(), pref_registry, false);
local_state_path, local_state_task_runner_.get(), pref_registry);
const int max_per_proxy =
local_state_->GetInteger(ios::prefs::kMaxConnectionsPerProxy);
......
......@@ -33,12 +33,10 @@ void HandleReadError(PersistentPrefStore::PrefReadError error) {
void PrepareFactory(syncable_prefs::PrefServiceSyncableFactory* factory,
const base::FilePath& pref_filename,
base::SequencedTaskRunner* pref_io_task_runner,
bool async) {
base::SequencedTaskRunner* pref_io_task_runner) {
factory->set_user_prefs(make_scoped_refptr(new JsonPrefStore(
pref_filename, pref_io_task_runner, scoped_ptr<PrefFilter>())));
factory->set_async(async);
factory->set_read_error_callback(base::Bind(&HandleReadError));
factory->SetPrefModelAssociatorClient(
IOSChromePrefModelAssociatorClient::GetInstance());
......@@ -49,10 +47,9 @@ void PrepareFactory(syncable_prefs::PrefServiceSyncableFactory* factory,
scoped_ptr<PrefService> CreateLocalState(
const base::FilePath& pref_filename,
base::SequencedTaskRunner* pref_io_task_runner,
const scoped_refptr<PrefRegistry>& pref_registry,
bool async) {
const scoped_refptr<PrefRegistry>& pref_registry) {
syncable_prefs::PrefServiceSyncableFactory factory;
PrepareFactory(&factory, pref_filename, pref_io_task_runner, async);
PrepareFactory(&factory, pref_filename, pref_io_task_runner);
return factory.Create(pref_registry.get());
}
......@@ -60,8 +57,7 @@ scoped_ptr<syncable_prefs::PrefServiceSyncable> CreateBrowserStatePrefs(
const base::FilePath& browser_state_path,
base::SequencedTaskRunner* pref_io_task_runner,
TrackedPreferenceValidationDelegate* validation_delegate,
const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry,
bool async) {
const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry) {
// chrome_prefs::CreateProfilePrefs uses ProfilePrefStoreManager to create
// the preference store however since Chrome on iOS does not need to track
// preference modifications (as applications are sand-boxed), it can use a
......@@ -69,7 +65,7 @@ scoped_ptr<syncable_prefs::PrefServiceSyncable> CreateBrowserStatePrefs(
// on platforms that do not track preference modifications).
syncable_prefs::PrefServiceSyncableFactory factory;
PrepareFactory(&factory, browser_state_path.Append(kPreferencesFilename),
pref_io_task_runner, async);
pref_io_task_runner);
scoped_ptr<syncable_prefs::PrefServiceSyncable> pref_service =
factory.CreateSyncable(pref_registry.get());
ConfigureDefaultSearchPrefMigrationToDictionaryValue(pref_service.get());
......
......@@ -34,19 +34,17 @@ class PrefRegistrySyncable;
// for Chrome on iOS with the applicable PrefStores. The |pref_filename| points
// to the user preference file. This is the usual way to create a new
// PrefService. |pref_registry| keeps the list of registered prefs and their
// default valuers. If |async| is true, asynchronous version is used.
// default values.
scoped_ptr<PrefService> CreateLocalState(
const base::FilePath& pref_filename,
base::SequencedTaskRunner* pref_io_task_runner,
const scoped_refptr<PrefRegistry>& pref_registry,
bool async);
const scoped_refptr<PrefRegistry>& pref_registry);
scoped_ptr<syncable_prefs::PrefServiceSyncable> CreateBrowserStatePrefs(
const base::FilePath& browser_state_path,
base::SequencedTaskRunner* pref_io_task_runner,
TrackedPreferenceValidationDelegate* validation_delegate,
const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry,
bool async);
const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry);
// Creates an incognito copy of |pref_service| that shares most prefs but uses
// a fresh non-persistent overlay for the user pref store.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment