Chromium Code Reviews| Index: chrome/browser/extensions/webstore_installer.h |
| diff --git a/chrome/browser/extensions/webstore_installer.h b/chrome/browser/extensions/webstore_installer.h |
| index c0e2d50fc7461b046328faffdc978794d2779ceb..d3b46a4cf40553776539bd38473234589178449b 100644 |
| --- a/chrome/browser/extensions/webstore_installer.h |
| +++ b/chrome/browser/extensions/webstore_installer.h |
| @@ -11,6 +11,7 @@ |
| #include "base/compiler_specific.h" |
| #include "base/memory/ref_counted.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/scoped_observer.h" |
| #include "base/supports_user_data.h" |
| #include "base/timer/timer.h" |
| #include "base/values.h" |
| @@ -22,6 +23,7 @@ |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| #include "content/public/browser/web_contents_observer.h" |
| +#include "extensions/browser/extension_registry_observer.h" |
| #include "extensions/common/manifest_handlers/shared_module_info.h" |
| #include "ui/gfx/image/image_skia.h" |
| #include "url/gurl.h" |
| @@ -40,14 +42,17 @@ namespace extensions { |
| class CrxInstaller; |
| class Extension; |
| +class ExtensionRegistry; |
| class Manifest; |
| // Downloads and installs extensions from the web store. |
| class WebstoreInstaller : public content::NotificationObserver, |
| + public ExtensionRegistryObserver, |
| public content::DownloadItem::Observer, |
| public content::WebContentsObserver, |
| public base::RefCountedThreadSafe< |
| - WebstoreInstaller, content::BrowserThread::DeleteOnUIThread> { |
| + WebstoreInstaller, |
| + content::BrowserThread::DeleteOnUIThread> { |
| public: |
| enum InstallSource { |
| // Inline installs trigger slightly different behavior (install source |
| @@ -188,11 +193,17 @@ class WebstoreInstaller : public content::NotificationObserver, |
| // Starts downloading and installing the extension. |
| void Start(); |
| - // content::NotificationObserver |
| + // content::NotificationObserver: |
|
not at google - send to devlin
2014/05/16 13:49:03
FWIW nobody seems to be able to agree on what the
limasdf
2014/05/16 20:39:14
Done.
|
| virtual void Observe(int type, |
| const content::NotificationSource& source, |
| const content::NotificationDetails& details) OVERRIDE; |
| + // ExtensionRegistryObserver: |
| + virtual void OnExtensionInstalled(content::BrowserContext* browser_context, |
| + const Extension* extension, |
| + bool is_update, |
| + const std::string& old_name) OVERRIDE; |
| + |
| // Removes the reference to the delegate passed in the constructor. Used when |
| // the delegate object must be deleted before this object. |
| void InvalidateDelegate(); |
| @@ -249,6 +260,8 @@ class WebstoreInstaller : public content::NotificationObserver, |
| void RecordInterrupt(const content::DownloadItem* download) const; |
| content::NotificationRegistrar registrar_; |
| + ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| + extension_registry_observer_; |
| Profile* profile_; |
| Delegate* delegate_; |
| std::string id_; |