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

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

Issue 160483: Ever closer. Extract a client interface out of CrxInstaller and (Closed)
Patch Set: nits Created 11 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/download/download_manager.cc
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index 9c548d2d084bfe29e69a54ea864826dca7424c2c..9609292c8ec31c646b1d094ec01ed765540acca8 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/browser_list.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/download_file.h"
+#include "chrome/browser/extensions/extension_install_ui.h"
#include "chrome/browser/extensions/extensions_service.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/render_process_host.h"
@@ -1251,9 +1252,17 @@ void DownloadManager::OpenChromeExtension(const FilePath& full_path,
const GURL& download_url,
const GURL& referrer_url) {
// We don't support extensions in OTR mode.
- if (profile_->GetExtensionsService())
- profile_->GetExtensionsService()->InstallExtension(full_path, download_url,
- referrer_url);
+ ExtensionsService* service = profile_->GetExtensionsService();
+ if (service) {
+ CrxInstaller::Start(full_path,
+ service->install_directory(),
+ Extension::INTERNAL,
+ "", // no expected id
+ true, // please delete crx on completion
+ g_browser_process->file_thread()->message_loop(),
+ service,
+ new ExtensionInstallUI(profile_));
+ }
}
void DownloadManager::OpenDownloadInShell(const DownloadItem* download,
« no previous file with comments | « no previous file | chrome/browser/extensions/crx_installer.h » ('j') | chrome/browser/extensions/crx_installer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698