OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 Extension::Location location, | 54 Extension::Location location, |
55 int extra_flags); | 55 int extra_flags); |
56 | 56 |
57 // Similar to AddExtension, this adds a new test Extension. This is useful for | 57 // Similar to AddExtension, this adds a new test Extension. This is useful for |
58 // cases when you don't need the Extension object, but just the id it was | 58 // cases when you don't need the Extension object, but just the id it was |
59 // assigned. | 59 // assigned. |
60 std::string AddExtensionAndReturnId(std::string name); | 60 std::string AddExtensionAndReturnId(std::string name); |
61 | 61 |
62 PrefService* CreateIncognitoPrefService() const; | 62 PrefService* CreateIncognitoPrefService() const; |
63 | 63 |
| 64 // Allows disabling the loading of preferences of extensions. Becomes |
| 65 // active after calling RecreateExtensionPrefs(). Defaults to false. |
| 66 void set_extensions_disabled(bool extensions_disabled); |
| 67 |
64 protected: | 68 protected: |
65 ScopedTempDir temp_dir_; | 69 ScopedTempDir temp_dir_; |
66 FilePath preferences_file_; | 70 FilePath preferences_file_; |
67 FilePath extensions_dir_; | 71 FilePath extensions_dir_; |
68 scoped_ptr<PrefService> pref_service_; | 72 scoped_ptr<PrefService> pref_service_; |
69 scoped_ptr<ExtensionPrefs> prefs_; | 73 scoped_ptr<ExtensionPrefs> prefs_; |
70 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_; | 74 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_; |
71 | 75 |
72 private: | 76 private: |
| 77 bool extensions_disabled_; |
73 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); | 78 DISALLOW_COPY_AND_ASSIGN(TestExtensionPrefs); |
74 }; | 79 }; |
75 | 80 |
76 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ | 81 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_PREFS_H_ |
OLD | NEW |