summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/download/download_manager.cc')
-rw-r--r--chrome/browser/download/download_manager.cc37
1 files changed, 9 insertions, 28 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index 248df33..93cbaed 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/download/download_manager.h"
#include "app/l10n_util.h"
-#include "base/command_line.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/message_loop.h"
@@ -29,7 +28,6 @@
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/platform_util.h"
#include "chrome/common/pref_names.h"
@@ -1230,37 +1228,20 @@ void DownloadManager::OpenDownload(const DownloadItem* download,
}
void DownloadManager::OpenChromeExtension(const FilePath& full_path) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableExtensions)) {
- // Temporary: Ask the user if it's okay to install the extension. This
- // should be replaced with the actual extension installation UI when it is
- // avaiable.
#if defined(OS_WIN)
- if (win_util::MessageBox(GetActiveWindow(),
- L"Are you sure you want to install this extension?\n\n"
- L"This is a temporary message and it will be removed when extensions "
- L"UI is finalized.",
- l10n_util::GetString(IDS_PRODUCT_NAME).c_str(), MB_OKCANCEL) == IDOK) {
- ExtensionsService* extensions_service = profile_->GetExtensionsService();
- extensions_service->InstallExtension(full_path);
- }
-#else
- // TODO(port): Needs CreateChromeWindow.
+ if (win_util::MessageBox(GetActiveWindow(),
+ L"Are you sure you want to install this extension?\n\n"
+ L"This is a temporary message and it will be removed when extensions "
+ L"UI is finalized.",
+ l10n_util::GetString(IDS_PRODUCT_NAME).c_str(), MB_OKCANCEL) == IDOK) {
ExtensionsService* extensions_service = profile_->GetExtensionsService();
extensions_service->InstallExtension(full_path);
-#endif
- } else {
-#if defined(OS_WIN)
- win_util::MessageBox(GetActiveWindow(),
- L"Extensions are not enabled. Add --enable-extensions to the "
- L"command-line to enable extensions.\n\n"
- L"This is a temporary message and it will be removed when extensions "
- L"UI is finalized.",
- l10n_util::GetString(IDS_PRODUCT_NAME).c_str(), MB_OK);
+ }
#else
- // TODO(port): Needs CreateChromeWindow
+ // TODO(port): Needs CreateChromeWindow.
+ ExtensionsService* extensions_service = profile_->GetExtensionsService();
+ extensions_service->InstallExtension(full_path);
#endif
- }
}
void DownloadManager::OpenDownloadInShell(const DownloadItem* download,