OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSION_MANAGEMENT_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_TEST_UTIL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_TEST_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/extensions/extension_management_constants.h" | 13 #include "chrome/browser/extensions/extension_management_constants.h" |
14 #include "extensions/browser/pref_names.h" | 14 #include "extensions/browser/pref_names.h" |
15 #include "extensions/common/extension.h" | 15 #include "extensions/common/extension.h" |
16 | 16 |
17 namespace extensions { | 17 namespace extensions { |
18 | 18 |
19 // Base class for essential routines on preference manipulation. | 19 // Base class for essential routines on preference manipulation. |
20 class ExtensionManagementPrefUpdaterBase { | 20 class ExtensionManagementPrefUpdaterBase { |
21 public: | 21 public: |
22 ExtensionManagementPrefUpdaterBase(); | 22 ExtensionManagementPrefUpdaterBase(); |
23 virtual ~ExtensionManagementPrefUpdaterBase(); | 23 virtual ~ExtensionManagementPrefUpdaterBase(); |
24 | 24 |
| 25 // Helper functions for per extension settings. |
| 26 void UnsetPerExtensionSettings(const ExtensionId& id); |
| 27 void ClearPerExtensionSettings(const ExtensionId& id); |
| 28 |
25 // Helper functions for 'installation_mode' manipulation. | 29 // Helper functions for 'installation_mode' manipulation. |
26 void SetBlacklistedByDefault(bool value); | 30 void SetBlacklistedByDefault(bool value); |
27 void ClearInstallationModesForIndividualExtensions(); | 31 void ClearInstallationModesForIndividualExtensions(); |
28 void SetIndividualExtensionInstallationAllowed(const ExtensionId& id, | 32 void SetIndividualExtensionInstallationAllowed(const ExtensionId& id, |
29 bool allowed); | 33 bool allowed); |
30 void SetIndividualExtensionAutoInstalled(const ExtensionId& id, | 34 void SetIndividualExtensionAutoInstalled(const ExtensionId& id, |
31 const std::string& update_url, | 35 const std::string& update_url, |
32 bool forced); | 36 bool forced); |
33 | 37 |
34 // Helper functions for 'install_sources' manipulation. | 38 // Helper functions for 'install_sources' manipulation. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 98 |
95 private: | 99 private: |
96 TestingPrefService* service_; | 100 TestingPrefService* service_; |
97 | 101 |
98 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementPrefUpdater); | 102 DISALLOW_COPY_AND_ASSIGN(ExtensionManagementPrefUpdater); |
99 }; | 103 }; |
100 | 104 |
101 } // namespace extensions | 105 } // namespace extensions |
102 | 106 |
103 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_TEST_UTIL_H_ | 107 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_TEST_UTIL_H_ |
OLD | NEW |