diff options
author | georged@chromium.org <georged@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-03 20:28:44 +0000 |
---|---|---|
committer | georged@chromium.org <georged@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-03 20:28:44 +0000 |
commit | d81706b859fa9ec8d48d0f471b6245b36aeac510 (patch) | |
tree | f857e583e74389d423d7b42a451ee10e4b3011ee /chrome | |
parent | 2d4f7b42aecbdc10d29fa4815cc0166d42ee4b34 (diff) | |
download | chromium_src-d81706b859fa9ec8d48d0f471b6245b36aeac510.zip chromium_src-d81706b859fa9ec8d48d0f471b6245b36aeac510.tar.gz chromium_src-d81706b859fa9ec8d48d0f471b6245b36aeac510.tar.bz2 |
Adds temporary warning when installing Chrome extensions. The warning
will be replaced with the final extension installation UI when
available.
Review URL: http://codereview.chromium.org/60079
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13103 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/download/download_manager.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc index 9574096..db76181 100644 --- a/chrome/browser/download/download_manager.cc +++ b/chrome/browser/download/download_manager.cc @@ -34,6 +34,7 @@ #include "chrome/common/pref_service.h" #include "chrome/common/stl_util-inl.h" #include "googleurl/src/gurl.h" +#include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "net/base/mime_util.h" #include "net/base/net_util.h" @@ -1233,8 +1234,23 @@ void DownloadManager::OpenDownload(const DownloadItem* download, } void DownloadManager::OpenChromeExtension(const FilePath& full_path) { + // 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 UI " + L"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. ExtensionsService* extensions_service = profile_->GetExtensionsService(); extensions_service->InstallExtension(full_path); +#endif + } void DownloadManager::OpenDownloadInShell(const DownloadItem* download, |