| 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_EXTENSION_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 void OnExtensionUninstalled(const std::string& extension_id, | 114 void OnExtensionUninstalled(const std::string& extension_id, |
| 115 const Extension::Location& location, | 115 const Extension::Location& location, |
| 116 bool external_uninstall); | 116 bool external_uninstall); |
| 117 | 117 |
| 118 // Called to change the extension's state when it is enabled/disabled. | 118 // Called to change the extension's state when it is enabled/disabled. |
| 119 void SetExtensionState(const std::string& extension_id, Extension::State); | 119 void SetExtensionState(const std::string& extension_id, Extension::State); |
| 120 | 120 |
| 121 // Returns all installed extensions | 121 // Returns all installed extensions |
| 122 void GetExtensions(ExtensionIdSet* out); | 122 void GetExtensions(ExtensionIdSet* out); |
| 123 | 123 |
| 124 // Returns all installed extensions from |extension_prefs|. This is exposed |
| 125 // for ProtectedPrefsWatcher because it needs access to the extension ID list |
| 126 // before the ExtensionService is initialized. |
| 127 static ExtensionIdSet GetExtensionsFrom( |
| 128 const base::DictionaryValue* extension_prefs); |
| 129 |
| 124 // Getter and setter for browser action visibility. | 130 // Getter and setter for browser action visibility. |
| 125 bool GetBrowserActionVisibility(const Extension* extension); | 131 bool GetBrowserActionVisibility(const Extension* extension); |
| 126 void SetBrowserActionVisibility(const Extension* extension, bool visible); | 132 void SetBrowserActionVisibility(const Extension* extension, bool visible); |
| 127 | 133 |
| 128 // Did the extension ask to escalate its permission during an upgrade? | 134 // Did the extension ask to escalate its permission during an upgrade? |
| 129 bool DidExtensionEscalatePermissions(const std::string& id); | 135 bool DidExtensionEscalatePermissions(const std::string& id); |
| 130 | 136 |
| 131 // If |did_escalate| is true, the preferences for |extension| will be set to | 137 // If |did_escalate| is true, the preferences for |extension| will be set to |
| 132 // require the install warning when the user tries to enable. | 138 // require the install warning when the user tries to enable. |
| 133 void SetDidExtensionEscalatePermissions(const Extension* extension, | 139 void SetDidExtensionEscalatePermissions(const Extension* extension, |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 // Contains all the logic for handling the order for various extension | 504 // Contains all the logic for handling the order for various extension |
| 499 // properties. | 505 // properties. |
| 500 scoped_ptr<ExtensionSorting> extension_sorting_; | 506 scoped_ptr<ExtensionSorting> extension_sorting_; |
| 501 | 507 |
| 502 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; | 508 scoped_refptr<ExtensionContentSettingsStore> content_settings_store_; |
| 503 | 509 |
| 504 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 510 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 505 }; | 511 }; |
| 506 | 512 |
| 507 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 513 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| OLD | NEW |