Chromium Code Reviews| Index: chrome/browser/extensions/install_observer.h |
| diff --git a/chrome/browser/extensions/install_observer.h b/chrome/browser/extensions/install_observer.h |
| index 6c64cca7e815e66eef55ca3c09ae1f6b92f37e1d..6622dddfd6e9748b9e2296d429a3769e559b7b0b 100644 |
| --- a/chrome/browser/extensions/install_observer.h |
| +++ b/chrome/browser/extensions/install_observer.h |
| @@ -33,34 +33,43 @@ class InstallObserver { |
| // Called at the beginning of the complete installation process, i.e., this |
| // is called before the extension download begins. |
| - virtual void OnBeginExtensionInstall(const ExtensionInstallParams& params); |
| + virtual void OnBeginExtensionInstall(const ExtensionInstallParams& params) {} |
| + |
| + // Called when the Extension begins the download process. This typically |
| + // happens right after OnBeginExtensionInstall(), unless the extension has |
| + // already been downloaded. |
| + virtual void OnBeginExtensionDownload(const std::string& extension_id) {} |
| // Called whenever the extension download is updated. |
| // Note: Some extensions have multiple modules, so the percent included here |
| // is a simple calculation of: |
| // (finished_files * 100 + current_file_progress) / (total files * 100). |
| virtual void OnDownloadProgress(const std::string& extension_id, |
| - int percent_downloaded); |
| + int percent_downloaded) {} |
| + |
| + // Called when the necessary downloads have completed, and the crx |
| + // installation is due to start. |
| + virtual void OnBeginCrxInstall(const std::string& extension_id) {} |
| // Called if the extension fails to install. |
| - virtual void OnInstallFailure(const std::string& extension_id); |
| + virtual void OnInstallFailure(const std::string& extension_id) {} |
| // Called if the installation succeeds. |
| - virtual void OnExtensionInstalled(const Extension* extension); |
| + virtual void OnExtensionInstalled(const Extension* extension) {} |
| // Called when an extension is [Loaded, Unloaded, Uninstalled] or an app is |
| // installed to the app list. These are simply forwarded from the |
| // chrome::NOTIFICATIONs. |
| - virtual void OnExtensionLoaded(const Extension* extension); |
| - virtual void OnExtensionUnloaded(const Extension* extension); |
| - virtual void OnExtensionUninstalled(const Extension* extension); |
| - virtual void OnAppInstalledToAppList(const std::string& extension_id); |
| + virtual void OnExtensionLoaded(const Extension* extension) {} |
| + virtual void OnExtensionUnloaded(const Extension* extension) {} |
| + virtual void OnExtensionUninstalled(const Extension* extension) {} |
| + virtual void OnAppInstalledToAppList(const std::string& extension_id) {} |
|
asargent_no_longer_on_chrome
2014/03/03 18:49:08
Hmm, some of these stretch the definition of "inst
Devlin
2014/03/03 21:15:13
Good point. If it's alright, I'll do that change
asargent_no_longer_on_chrome
2014/03/03 22:25:33
Separate CL would be fine.
|
| // Called when the app list is reordered. |
| - virtual void OnAppsReordered(); |
| + virtual void OnAppsReordered() {} |
| // Notifies observers that the observed object is going away. |
| - virtual void OnShutdown(); |
| + virtual void OnShutdown() {} |
| protected: |
| virtual ~InstallObserver() {} |