| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 // TODO(aa): Remove |external_uninstall| -- this information should be passed | 262 // TODO(aa): Remove |external_uninstall| -- this information should be passed |
| 263 // to ExtensionPrefs some other way. | 263 // to ExtensionPrefs some other way. |
| 264 void UninstallExtension(const std::string& extension_id, | 264 void UninstallExtension(const std::string& extension_id, |
| 265 bool external_uninstall); | 265 bool external_uninstall); |
| 266 | 266 |
| 267 // Enable or disable an extension. No action if the extension is already | 267 // Enable or disable an extension. No action if the extension is already |
| 268 // enabled/disabled. | 268 // enabled/disabled. |
| 269 void EnableExtension(const std::string& extension_id); | 269 void EnableExtension(const std::string& extension_id); |
| 270 void DisableExtension(const std::string& extension_id); | 270 void DisableExtension(const std::string& extension_id); |
| 271 | 271 |
| 272 // Grants the permissions the |extension| has requested. |
| 273 void GrantPermissions(const Extension* extension); |
| 274 |
| 275 // Grants the permissions the |extension| has requested and re-enables the |
| 276 // extension. |
| 277 void GrantPermissionsAndEnableExtension(const Extension* extension); |
| 278 |
| 272 // Load the extension from the directory |extension_path|. | 279 // Load the extension from the directory |extension_path|. |
| 273 void LoadExtension(const FilePath& extension_path); | 280 void LoadExtension(const FilePath& extension_path); |
| 274 | 281 |
| 275 // Load any component extensions. | 282 // Load any component extensions. |
| 276 void LoadComponentExtensions(); | 283 void LoadComponentExtensions(); |
| 277 | 284 |
| 278 // Load all known extensions (used by startup and testing code). | 285 // Load all known extensions (used by startup and testing code). |
| 279 void LoadAllExtensions(); | 286 void LoadAllExtensions(); |
| 280 | 287 |
| 281 // Continues loading all know extensions. It can be called from | 288 // Continues loading all know extensions. It can be called from |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 577 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, |
| 571 UpdatePendingExtensionAlreadyInstalled); | 578 UpdatePendingExtensionAlreadyInstalled); |
| 572 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 579 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, |
| 573 InstallAppsWithUnlimtedStorage); | 580 InstallAppsWithUnlimtedStorage); |
| 574 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, | 581 FRIEND_TEST_ALL_PREFIXES(ExtensionsServiceTest, |
| 575 InstallAppsAndCheckStorageProtection); | 582 InstallAppsAndCheckStorageProtection); |
| 576 DISALLOW_COPY_AND_ASSIGN(ExtensionsService); | 583 DISALLOW_COPY_AND_ASSIGN(ExtensionsService); |
| 577 }; | 584 }; |
| 578 | 585 |
| 579 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ | 586 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSIONS_SERVICE_H_ |
| OLD | NEW |