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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 // Handles sending notification that |extension| was unloaded. | 498 // Handles sending notification that |extension| was unloaded. |
499 void NotifyExtensionUnloaded( | 499 void NotifyExtensionUnloaded( |
500 const extensions::Extension* extension, | 500 const extensions::Extension* extension, |
501 extensions::UnloadedExtensionInfo::Reason reason); | 501 extensions::UnloadedExtensionInfo::Reason reason); |
502 | 502 |
503 // Common helper to finish installing the given extension. |was_ephemeral| | 503 // Common helper to finish installing the given extension. |was_ephemeral| |
504 // should be true if the extension was previously installed and ephemeral. | 504 // should be true if the extension was previously installed and ephemeral. |
505 void FinishInstallation(const extensions::Extension* extension, | 505 void FinishInstallation(const extensions::Extension* extension, |
506 bool was_ephemeral); | 506 bool was_ephemeral); |
507 | 507 |
508 // Updates the |extension|'s active permission set to include only permissions | |
509 // currently requested by the extension and all the permissions required by | |
510 // the extension. | |
511 void UpdateActivePermissions(const extensions::Extension* extension); | |
512 | |
513 // Disables the extension if the privilege level has increased | 508 // Disables the extension if the privilege level has increased |
514 // (e.g., due to an upgrade). | 509 // (e.g., due to an upgrade). |
515 void CheckPermissionsIncrease(const extensions::Extension* extension, | 510 void CheckPermissionsIncrease(const extensions::Extension* extension, |
516 bool is_extension_installed); | 511 bool is_extension_installed); |
517 | 512 |
518 // Helper that updates the active extension list used for crash reporting. | 513 // Helper that updates the active extension list used for crash reporting. |
519 void UpdateActiveExtensionsInCrashReporter(); | 514 void UpdateActiveExtensionsInCrashReporter(); |
520 | 515 |
521 // Helper to determine whether we should initially enable an installed | 516 // Helper to determine whether we should initially enable an installed |
522 // (or upgraded) extension. | 517 // (or upgraded) extension. |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 GreylistedExtensionDisabled); | 703 GreylistedExtensionDisabled); |
709 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 704 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
710 GreylistDontEnableManuallyDisabled); | 705 GreylistDontEnableManuallyDisabled); |
711 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 706 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
712 GreylistUnknownDontChange); | 707 GreylistUnknownDontChange); |
713 | 708 |
714 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 709 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
715 }; | 710 }; |
716 | 711 |
717 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 712 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |