| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTERNAL_INSTALL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_MANAGER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class ExtensionPrefs; | 27 class ExtensionPrefs; |
| 28 class ExternalInstallError; | 28 class ExternalInstallError; |
| 29 | 29 |
| 30 class ExternalInstallManager : public ExtensionRegistryObserver, | 30 class ExternalInstallManager : public ExtensionRegistryObserver, |
| 31 public content::NotificationObserver { | 31 public content::NotificationObserver { |
| 32 public: | 32 public: |
| 33 ExternalInstallManager(content::BrowserContext* browser_context, | 33 ExternalInstallManager(content::BrowserContext* browser_context, |
| 34 bool is_first_run); | 34 bool is_first_run); |
| 35 ~ExternalInstallManager() override; | 35 ~ExternalInstallManager() override; |
| 36 | 36 |
| 37 // Returns true if prompting for external extensions is enabled. | |
| 38 static bool IsPromptingEnabled(); | |
| 39 | |
| 40 // Removes the error associated with a given extension. | 37 // Removes the error associated with a given extension. |
| 41 void RemoveExternalInstallError(const std::string& extension_id); | 38 void RemoveExternalInstallError(const std::string& extension_id); |
| 42 | 39 |
| 43 // Checks if there are any new external extensions to notify the user about. | 40 // Checks if there are any new external extensions to notify the user about. |
| 44 void UpdateExternalExtensionAlert(); | 41 void UpdateExternalExtensionAlert(); |
| 45 | 42 |
| 46 // Given a (presumably just-installed) extension id, mark that extension as | 43 // Given a (presumably just-installed) extension id, mark that extension as |
| 47 // acknowledged. | 44 // acknowledged. |
| 48 void AcknowledgeExternalExtension(const std::string& extension_id); | 45 void AcknowledgeExternalExtension(const std::string& extension_id); |
| 49 | 46 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 113 |
| 117 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 114 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| 118 extension_registry_observer_; | 115 extension_registry_observer_; |
| 119 | 116 |
| 120 DISALLOW_COPY_AND_ASSIGN(ExternalInstallManager); | 117 DISALLOW_COPY_AND_ASSIGN(ExternalInstallManager); |
| 121 }; | 118 }; |
| 122 | 119 |
| 123 } // namespace extensions | 120 } // namespace extensions |
| 124 | 121 |
| 125 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_MANAGER_H_ | 122 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_MANAGER_H_ |
| OLD | NEW |