| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/scoped_temp_dir.h" | |
| 12 #include "chrome/common/extensions/extension.h" | 12 #include "chrome/common/extensions/extension.h" |
| 13 | 13 |
| 14 class ExtensionPrefValueMap; | 14 class ExtensionPrefValueMap; |
| 15 class PrefService; | 15 class PrefService; |
| 16 | 16 |
| 17 namespace base { | 17 namespace base { |
| 18 class DictionaryValue; | 18 class DictionaryValue; |
| 19 class SequencedTaskRunner; | 19 class SequencedTaskRunner; |
| 20 } | 20 } |
| 21 | 21 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // assigned. | 65 // assigned. |
| 66 std::string AddExtensionAndReturnId(std::string name); | 66 std::string AddExtensionAndReturnId(std::string name); |
| 67 | 67 |
| 68 PrefService* CreateIncognitoPrefService() const; | 68 PrefService* CreateIncognitoPrefService() const; |
| 69 | 69 |
| 70 // Allows disabling the loading of preferences of extensions. Becomes | 70 // Allows disabling the loading of preferences of extensions. Becomes |
| 71 // active after calling RecreateExtensionPrefs(). Defaults to false. | 71 // active after calling RecreateExtensionPrefs(). Defaults to false. |
| 72 void set_extensions_disabled(bool extensions_disabled); | 72 void set_extensions_disabled(bool extensions_disabled); |
| 73 | 73 |
| 74 protected: | 74 protected: |
| 75 ScopedTempDir temp_dir_; | 75 base::ScopedTempDir temp_dir_; |
| 76 FilePath preferences_file_; | 76 FilePath preferences_file_; |
| 77 FilePath extensions_dir_; | 77 FilePath extensions_dir_; |
| 78 scoped_ptr<PrefService> pref_service_; | 78 scoped_ptr<PrefService> pref_service_; |
| 79 scoped_ptr<ExtensionPrefs> prefs_; | 79 scoped_ptr<ExtensionPrefs> prefs_; |
| 80 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_; | 80 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_; |
| 81 const scoped_refptr<base::SequencedTaskRunner> task_runner_; | 81 const scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 bool extensions_disabled_; | 84 bool extensions_disabled_; |
| 85 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); | 85 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace extensions | 88 } // namespace extensions |
| 89 | 89 |
| 90 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ | 90 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ |
| OLD | NEW |