| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_CHROME_BROWSER_PREFS_IOS_CHROME_PREF_SERVICE_FACTORY_H_ | 5 #ifndef IOS_CHROME_BROWSER_PREFS_IOS_CHROME_PREF_SERVICE_FACTORY_H_ |
| 6 #define IOS_CHROME_BROWSER_PREFS_IOS_CHROME_PREF_SERVICE_FACTORY_H_ | 6 #define IOS_CHROME_BROWSER_PREFS_IOS_CHROME_PREF_SERVICE_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace user_prefs { | 29 namespace user_prefs { |
| 30 class PrefRegistrySyncable; | 30 class PrefRegistrySyncable; |
| 31 } | 31 } |
| 32 | 32 |
| 33 // Factory methods that create and initialize a new instance of a PrefService | 33 // Factory methods that create and initialize a new instance of a PrefService |
| 34 // for Chrome on iOS with the applicable PrefStores. The |pref_filename| points | 34 // for Chrome on iOS with the applicable PrefStores. The |pref_filename| points |
| 35 // to the user preference file. This is the usual way to create a new | 35 // to the user preference file. This is the usual way to create a new |
| 36 // PrefService. |pref_registry| keeps the list of registered prefs and their | 36 // PrefService. |pref_registry| keeps the list of registered prefs and their |
| 37 // default valuers. If |async| is true, asynchronous version is used. | 37 // default values. |
| 38 scoped_ptr<PrefService> CreateLocalState( | 38 scoped_ptr<PrefService> CreateLocalState( |
| 39 const base::FilePath& pref_filename, | 39 const base::FilePath& pref_filename, |
| 40 base::SequencedTaskRunner* pref_io_task_runner, | 40 base::SequencedTaskRunner* pref_io_task_runner, |
| 41 const scoped_refptr<PrefRegistry>& pref_registry, | 41 const scoped_refptr<PrefRegistry>& pref_registry); |
| 42 bool async); | |
| 43 | 42 |
| 44 scoped_ptr<syncable_prefs::PrefServiceSyncable> CreateBrowserStatePrefs( | 43 scoped_ptr<syncable_prefs::PrefServiceSyncable> CreateBrowserStatePrefs( |
| 45 const base::FilePath& browser_state_path, | 44 const base::FilePath& browser_state_path, |
| 46 base::SequencedTaskRunner* pref_io_task_runner, | 45 base::SequencedTaskRunner* pref_io_task_runner, |
| 47 TrackedPreferenceValidationDelegate* validation_delegate, | 46 TrackedPreferenceValidationDelegate* validation_delegate, |
| 48 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry, | 47 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry); |
| 49 bool async); | |
| 50 | 48 |
| 51 // Creates an incognito copy of |pref_service| that shares most prefs but uses | 49 // Creates an incognito copy of |pref_service| that shares most prefs but uses |
| 52 // a fresh non-persistent overlay for the user pref store. | 50 // a fresh non-persistent overlay for the user pref store. |
| 53 scoped_ptr<syncable_prefs::PrefServiceSyncable> | 51 scoped_ptr<syncable_prefs::PrefServiceSyncable> |
| 54 CreateIncognitoBrowserStatePrefs( | 52 CreateIncognitoBrowserStatePrefs( |
| 55 syncable_prefs::PrefServiceSyncable* main_pref_store); | 53 syncable_prefs::PrefServiceSyncable* main_pref_store); |
| 56 | 54 |
| 57 #endif // IOS_CHROME_BROWSER_PREFS_IOS_CHROME_PREF_SERVICE_FACTORY_H_ | 55 #endif // IOS_CHROME_BROWSER_PREFS_IOS_CHROME_PREF_SERVICE_FACTORY_H_ |
| OLD | NEW |