OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_EXTENSIONS_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // Uninstalls the specified extension. Callers should only call this method | 123 // Uninstalls the specified extension. Callers should only call this method |
124 // with extensions that exist. |external_uninstall| is a magical parameter | 124 // with extensions that exist. |external_uninstall| is a magical parameter |
125 // that is only used to send information to ExtensionPrefs, which external | 125 // that is only used to send information to ExtensionPrefs, which external |
126 // callers should never set to true. | 126 // callers should never set to true. |
127 // TODO(aa): Remove |external_uninstall| -- this information should be passed | 127 // TODO(aa): Remove |external_uninstall| -- this information should be passed |
128 // to ExtensionPrefs some other way. | 128 // to ExtensionPrefs some other way. |
129 void UninstallExtension(const std::string& extension_id, | 129 void UninstallExtension(const std::string& extension_id, |
130 bool external_uninstall); | 130 bool external_uninstall); |
131 | 131 |
132 // Enable a previously disabled extension and reload it. The extension should | 132 // Enable or disable an extension. The extension must be in the opposite state |
133 // already exist in the extension prefs. | 133 // before calling. |
134 // TODO(mpcomplete): add DisableExtension. | |
135 void EnableExtension(const std::string& extension_id); | 134 void EnableExtension(const std::string& extension_id); |
| 135 void DisableExtension(const std::string& extension_id); |
136 | 136 |
137 // Load the extension from the directory |extension_path|. | 137 // Load the extension from the directory |extension_path|. |
138 void LoadExtension(const FilePath& extension_path); | 138 void LoadExtension(const FilePath& extension_path); |
139 | 139 |
140 // Load all known extensions (used by startup and testing code). | 140 // Load all known extensions (used by startup and testing code). |
141 void LoadAllExtensions(); | 141 void LoadAllExtensions(); |
142 | 142 |
143 // Check for updates (or potentially new extensions from external providers) | 143 // Check for updates (or potentially new extensions from external providers) |
144 void CheckForExternalUpdates(); | 144 void CheckForExternalUpdates(); |
145 | 145 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 | 361 |
362 // A map of all external extension providers. | 362 // A map of all external extension providers. |
363 typedef std::map<Extension::Location, | 363 typedef std::map<Extension::Location, |
364 linked_ptr<ExternalExtensionProvider> > ProviderMap; | 364 linked_ptr<ExternalExtensionProvider> > ProviderMap; |
365 ProviderMap external_extension_providers_; | 365 ProviderMap external_extension_providers_; |
366 | 366 |
367 DISALLOW_COPY_AND_ASSIGN(ExtensionsServiceBackend); | 367 DISALLOW_COPY_AND_ASSIGN(ExtensionsServiceBackend); |
368 }; | 368 }; |
369 | 369 |
370 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ | 370 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
OLD | NEW |