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