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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 virtual const extensions::ExtensionSet* extensions() const = 0; | 77 virtual const extensions::ExtensionSet* extensions() const = 0; |
78 | 78 |
79 virtual extensions::PendingExtensionManager* pending_extension_manager() = 0; | 79 virtual extensions::PendingExtensionManager* pending_extension_manager() = 0; |
80 | 80 |
81 // Install an update. Return true if the install can be started. | 81 // Install an update. Return true if the install can be started. |
82 // Set out_crx_installer to the installer if one was started. | 82 // Set out_crx_installer to the installer if one was started. |
83 virtual bool UpdateExtension( | 83 virtual bool UpdateExtension( |
84 const std::string& id, | 84 const std::string& id, |
85 const base::FilePath& path, | 85 const base::FilePath& path, |
86 bool file_ownership_passed, | 86 bool file_ownership_passed, |
87 const GURL& download_url, | |
88 extensions::CrxInstaller** out_crx_installer) = 0; | 87 extensions::CrxInstaller** out_crx_installer) = 0; |
89 virtual const extensions::Extension* GetExtensionById( | 88 virtual const extensions::Extension* GetExtensionById( |
90 const std::string& id, | 89 const std::string& id, |
91 bool include_disabled) const = 0; | 90 bool include_disabled) const = 0; |
92 virtual const extensions::Extension* GetInstalledExtension( | 91 virtual const extensions::Extension* GetInstalledExtension( |
93 const std::string& id) const = 0; | 92 const std::string& id) const = 0; |
94 | 93 |
95 virtual const extensions::Extension* GetPendingExtensionUpdate( | 94 virtual const extensions::Extension* GetPendingExtensionUpdate( |
96 const std::string& extension_id) const = 0; | 95 const std::string& extension_id) const = 0; |
97 virtual void FinishDelayedInstallation(const std::string& extension_id) = 0; | 96 virtual void FinishDelayedInstallation(const std::string& extension_id) = 0; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 const std::string& id) const OVERRIDE; | 182 const std::string& id) const OVERRIDE; |
184 | 183 |
185 // Updates a currently-installed extension with the contents from | 184 // Updates a currently-installed extension with the contents from |
186 // |extension_path|. | 185 // |extension_path|. |
187 // TODO(aa): This method can be removed. ExtensionUpdater could use | 186 // TODO(aa): This method can be removed. ExtensionUpdater could use |
188 // CrxInstaller directly instead. | 187 // CrxInstaller directly instead. |
189 virtual bool UpdateExtension( | 188 virtual bool UpdateExtension( |
190 const std::string& id, | 189 const std::string& id, |
191 const base::FilePath& extension_path, | 190 const base::FilePath& extension_path, |
192 bool file_ownership_passed, | 191 bool file_ownership_passed, |
193 const GURL& download_url, | |
194 extensions::CrxInstaller** out_crx_installer) OVERRIDE; | 192 extensions::CrxInstaller** out_crx_installer) OVERRIDE; |
195 | 193 |
196 // Reloads the specified extension, sending the onLaunched() event to it if it | 194 // Reloads the specified extension, sending the onLaunched() event to it if it |
197 // currently has any window showing. | 195 // currently has any window showing. |
198 void ReloadExtension(const std::string extension_id); | 196 void ReloadExtension(const std::string extension_id); |
199 | 197 |
200 // Uninstalls the specified extension. Callers should only call this method | 198 // Uninstalls the specified extension. Callers should only call this method |
201 // with extensions that exist. |external_uninstall| is a magical parameter | 199 // with extensions that exist. |external_uninstall| is a magical parameter |
202 // that is only used to send information to ExtensionPrefs, which external | 200 // that is only used to send information to ExtensionPrefs, which external |
203 // callers should never set to true. | 201 // callers should never set to true. |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 712 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
715 GreylistedExtensionDisabled); | 713 GreylistedExtensionDisabled); |
716 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 714 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
717 GreylistDontEnableManuallyDisabled); | 715 GreylistDontEnableManuallyDisabled); |
718 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 716 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
719 GreylistUnknownDontChange); | 717 GreylistUnknownDontChange); |
720 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 718 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
721 }; | 719 }; |
722 | 720 |
723 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 721 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |