| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 void AddExtension(Extension* extension); | 86 void AddExtension(Extension* extension); |
| 87 | 87 |
| 88 PrefService* CreateIncognitoPrefService() const; | 88 PrefService* CreateIncognitoPrefService() const; |
| 89 | 89 |
| 90 // Allows disabling the loading of preferences of extensions. Becomes | 90 // Allows disabling the loading of preferences of extensions. Becomes |
| 91 // active after calling RecreateExtensionPrefs(). Defaults to false. | 91 // active after calling RecreateExtensionPrefs(). Defaults to false. |
| 92 void set_extensions_disabled(bool extensions_disabled); | 92 void set_extensions_disabled(bool extensions_disabled); |
| 93 | 93 |
| 94 ChromeAppSorting* app_sorting(); | 94 ChromeAppSorting* app_sorting(); |
| 95 | 95 |
| 96 TestingProfile* profile() { return &profile_; } |
| 97 |
| 96 protected: | 98 protected: |
| 97 base::ScopedTempDir temp_dir_; | 99 base::ScopedTempDir temp_dir_; |
| 98 base::FilePath preferences_file_; | 100 base::FilePath preferences_file_; |
| 99 base::FilePath extensions_dir_; | 101 base::FilePath extensions_dir_; |
| 100 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_; | 102 scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_; |
| 101 std::unique_ptr<sync_preferences::PrefServiceSyncable> pref_service_; | 103 std::unique_ptr<sync_preferences::PrefServiceSyncable> pref_service_; |
| 102 std::unique_ptr<ExtensionPrefValueMap> extension_pref_value_map_; | 104 std::unique_ptr<ExtensionPrefValueMap> extension_pref_value_map_; |
| 103 const scoped_refptr<base::SequencedTaskRunner> task_runner_; | 105 const scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 104 | 106 |
| 105 private: | 107 private: |
| 106 TestingProfile profile_; | 108 TestingProfile profile_; |
| 107 bool extensions_disabled_; | 109 bool extensions_disabled_; |
| 108 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); | 110 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); |
| 109 }; | 111 }; |
| 110 | 112 |
| 111 } // namespace extensions | 113 } // namespace extensions |
| 112 | 114 |
| 113 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ | 115 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ |
| OLD | NEW |