| 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_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 343 |
| 344 // Disables the extension. If the extension is already disabled, or | 344 // Disables the extension. If the extension is already disabled, or |
| 345 // cannot be disabled, does nothing. | 345 // cannot be disabled, does nothing. |
| 346 virtual void DisableExtension(const std::string& extension_id, | 346 virtual void DisableExtension(const std::string& extension_id, |
| 347 extensions::Extension::DisableReason disable_reason); | 347 extensions::Extension::DisableReason disable_reason); |
| 348 | 348 |
| 349 // Updates the |extension|'s granted permissions lists to include all | 349 // Updates the |extension|'s granted permissions lists to include all |
| 350 // permissions in the |extension|'s manifest and re-enables the | 350 // permissions in the |extension|'s manifest and re-enables the |
| 351 // extension. | 351 // extension. |
| 352 void GrantPermissionsAndEnableExtension( | 352 void GrantPermissionsAndEnableExtension( |
| 353 const extensions::Extension* extension); | 353 const extensions::Extension* extension, |
| 354 bool record_oauth2_grant); |
| 354 | 355 |
| 355 // Check for updates (or potentially new extensions from external providers) | 356 // Check for updates (or potentially new extensions from external providers) |
| 356 void CheckForExternalUpdates(); | 357 void CheckForExternalUpdates(); |
| 357 | 358 |
| 358 // Unload the specified extension. | 359 // Unload the specified extension. |
| 359 virtual void UnloadExtension( | 360 virtual void UnloadExtension( |
| 360 const std::string& extension_id, | 361 const std::string& extension_id, |
| 361 extension_misc::UnloadedExtensionReason reason) OVERRIDE; | 362 extension_misc::UnloadedExtensionReason reason) OVERRIDE; |
| 362 | 363 |
| 363 // Unload all extensions. This is currently only called on shutdown, and | 364 // Unload all extensions. This is currently only called on shutdown, and |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 scoped_ptr<ExtensionGlobalError> extension_global_error_; | 849 scoped_ptr<ExtensionGlobalError> extension_global_error_; |
| 849 | 850 |
| 850 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 851 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 851 InstallAppsWithUnlimtedStorage); | 852 InstallAppsWithUnlimtedStorage); |
| 852 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 853 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 853 InstallAppsAndCheckStorageProtection); | 854 InstallAppsAndCheckStorageProtection); |
| 854 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 855 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 855 }; | 856 }; |
| 856 | 857 |
| 857 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 858 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |