| 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 <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 // extensions. | 579 // extensions. |
| 580 void IdentifyAlertableExtensions(); | 580 void IdentifyAlertableExtensions(); |
| 581 | 581 |
| 582 // Given an ExtensionErrorUI alert, populates it with any extensions that | 582 // Given an ExtensionErrorUI alert, populates it with any extensions that |
| 583 // need alerting. Returns true if the alert should be displayed at all. | 583 // need alerting. Returns true if the alert should be displayed at all. |
| 584 // | 584 // |
| 585 // This method takes the extension_error_ui argument rather than using | 585 // This method takes the extension_error_ui argument rather than using |
| 586 // the member variable to make it easier to test the method in isolation. | 586 // the member variable to make it easier to test the method in isolation. |
| 587 bool PopulateExtensionErrorUI(ExtensionErrorUI* extension_error_ui); | 587 bool PopulateExtensionErrorUI(ExtensionErrorUI* extension_error_ui); |
| 588 | 588 |
| 589 // Marks alertable extensions as acknowledged, after the user presses the | 589 // Checks if there are any new external extensions to notify the user about. |
| 590 // accept button. | 590 void UpdateExternalExtensionAlert(); |
| 591 void HandleExtensionAlertAccept(); | |
| 592 | 591 |
| 593 // Given a (presumably just-installed) extension id, mark that extension as | 592 // Given a (presumably just-installed) extension id, mark that extension as |
| 594 // acknowledged. | 593 // acknowledged. |
| 595 void AcknowledgeExternalExtension(const std::string& id); | 594 void AcknowledgeExternalExtension(const std::string& id); |
| 596 | 595 |
| 597 // Opens the Extensions page because the user wants to get more details | 596 // Opens the Extensions page because the user wants to get more details |
| 598 // about the alerts. | 597 // about the alerts. |
| 599 void HandleExtensionAlertDetails(); | 598 void HandleExtensionAlertDetails(); |
| 600 | 599 |
| 601 // Called when the extension alert is closed. | 600 // Called when the extension alert is closed. |
| 602 void HandleExtensionAlertClosed(); | 601 void HandleExtensionAlertClosed(); |
| 603 | 602 |
| 603 // Marks alertable extensions as acknowledged, after the user presses the |
| 604 // accept button. |
| 605 void HandleExtensionAlertAccept(); |
| 606 |
| 604 // content::NotificationObserver | 607 // content::NotificationObserver |
| 605 virtual void Observe(int type, | 608 virtual void Observe(int type, |
| 606 const content::NotificationSource& source, | 609 const content::NotificationSource& source, |
| 607 const content::NotificationDetails& details) OVERRIDE; | 610 const content::NotificationDetails& details) OVERRIDE; |
| 608 | 611 |
| 609 // Whether there are any apps installed. Component apps are not included. | 612 // Whether there are any apps installed. Component apps are not included. |
| 610 bool HasApps() const; | 613 bool HasApps() const; |
| 611 | 614 |
| 612 // Gets the set of loaded app ids. Component apps are not included. | 615 // Gets the set of loaded app ids. Component apps are not included. |
| 613 extensions::ExtensionIdSet GetAppIds() const; | 616 extensions::ExtensionIdSet GetAppIds() const; |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 #endif | 891 #endif |
| 889 | 892 |
| 890 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 893 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 891 InstallAppsWithUnlimtedStorage); | 894 InstallAppsWithUnlimtedStorage); |
| 892 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 895 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 893 InstallAppsAndCheckStorageProtection); | 896 InstallAppsAndCheckStorageProtection); |
| 894 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 897 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 895 }; | 898 }; |
| 896 | 899 |
| 897 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 900 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |