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

Unified Diff: chrome/browser/download/download_crx_util.cc

Issue 10907104: Support an --install-from-webstore command line switch (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: updated comment Created 8 years, 3 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/download/download_crx_util.cc
diff --git a/chrome/browser/download/download_crx_util.cc b/chrome/browser/download/download_crx_util.cc
index 2748d1be7f68b364c56ba0b125dc5452d4c59004..8e83c2400a7926b79095e0213a3f7148ee56cb14 100644
--- a/chrome/browser/download/download_crx_util.cc
+++ b/chrome/browser/download/download_crx_util.cc
@@ -77,10 +77,16 @@ scoped_refptr<extensions::CrxInstaller> OpenChromeExtension(
ExtensionService* service = profile->GetExtensionService();
CHECK(service);
+ bool is_gallery_download =
+ WebstoreInstaller::GetAssociatedApproval(download_item) != NULL;
+ ExtensionInstallPrompt* prompt = NULL;
+ if (!is_gallery_download)
Mihai Parparita -not on Chrome 2012/09/07 22:01:36 Doesn't this mean that the SetUseAppInstalledBubbl
asargent_no_longer_on_chrome 2012/09/14 23:24:35 Yes. New version of patch should fix this.
+ prompt = CreateExtensionInstallPrompt(profile);
+
scoped_refptr<extensions::CrxInstaller> installer(
extensions::CrxInstaller::Create(
service,
- CreateExtensionInstallPrompt(profile),
+ prompt,
WebstoreInstaller::GetAssociatedApproval(download_item)));
installer->set_delete_source(true);
@@ -96,8 +102,6 @@ scoped_refptr<extensions::CrxInstaller> OpenChromeExtension(
installer->InstallUserScript(download_item.GetFullPath(),
download_item.GetURL());
} else {
- bool is_gallery_download =
- WebstoreInstaller::GetAssociatedApproval(download_item) != NULL;
installer->set_original_mime_type(download_item.GetOriginalMimeType());
installer->set_apps_require_extension_mime_type(true);
installer->set_download_url(download_item.GetURL());

Powered by Google App Engine
This is Rietveld 408576698