Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Unified Diff: chrome/browser/ui/app_list/search/webstore/webstore_result.h

Issue 389613006: Prevent duplicate concurrent installs of the same extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed update of webstore_result Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/search/webstore/webstore_result.h
diff --git a/chrome/browser/ui/app_list/search/webstore/webstore_result.h b/chrome/browser/ui/app_list/search/webstore/webstore_result.h
index 7be3d87000cf0f3d847dc92de53691ee838a3876..f507c9837e8cfa9c1f9e76c62f55aa701a21abaf 100644
--- a/chrome/browser/ui/app_list/search/webstore/webstore_result.h
+++ b/chrome/browser/ui/app_list/search/webstore/webstore_result.h
@@ -43,6 +43,10 @@ class WebstoreResult : public ChromeSearchResult,
virtual ChromeSearchResultType GetType() OVERRIDE;
private:
+ // Set the initial state and start observing both InstallObserver and
+ // ExtensionRegistryObserver.
+ void InitAndStartObserving();
+
void UpdateActions();
void SetDefaultDetails();
void OnIconLoaded();
@@ -52,9 +56,6 @@ class WebstoreResult : public ChromeSearchResult,
void LaunchCallback(extensions::webstore_install::Result result,
const std::string& error);
- // Start observing both InstallObserver and ExtensionRegistryObserver.
- void StartObserving();
-
void StopObservingInstall();
void StopObservingRegistry();
@@ -64,12 +65,10 @@ class WebstoreResult : public ChromeSearchResult,
virtual void OnShutdown() OVERRIDE;
// extensions::ExtensionRegistryObserver overides:
- virtual void OnExtensionWillBeInstalled(
+ virtual void OnExtensionInstalled(
content::BrowserContext* browser_context,
const extensions::Extension* extension,
- bool is_update,
- bool from_ephemeral,
- const std::string& old_name) OVERRIDE;
+ bool is_update) OVERRIDE;
virtual void OnShutdown(extensions::ExtensionRegistry* registry) OVERRIDE;
Profile* profile_;

Powered by Google App Engine
This is Rietveld 408576698