diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-13 18:50:06 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-13 18:50:06 +0000 |
commit | 725f688c5d44e0a3d02e8a0f87ee5fef9e328eb1 (patch) | |
tree | 7bbf267f3c5259bbe7caa3dda99b00821d239b5f /chrome/renderer/plugins | |
parent | 25888eae643f3e6ba01b694f75769e52ae8f9bff (diff) | |
download | chromium_src-725f688c5d44e0a3d02e8a0f87ee5fef9e328eb1.zip chromium_src-725f688c5d44e0a3d02e8a0f87ee5fef9e328eb1.tar.gz chromium_src-725f688c5d44e0a3d02e8a0f87ee5fef9e328eb1.tar.bz2 |
Reland 117210 - Show error message when download a plug-in installer fails.
Also, don't try to directly download Flash Player from http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player.exe anymore.
Original review URL: http://codereview.chromium.org/9149004
TBR=arv@chromium.org
BUG=102987
TEST=Go to http://www/~bauerb/no_crawl/test/install_plugin.html, turn off your network and click on "Get Plug-in". You should see an error.
Review URL: http://codereview.chromium.org/9148024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117661 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/plugins')
-rw-r--r-- | chrome/renderer/plugins/missing_plugin.cc | 7 | ||||
-rw-r--r-- | chrome/renderer/plugins/missing_plugin.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/chrome/renderer/plugins/missing_plugin.cc b/chrome/renderer/plugins/missing_plugin.cc index 714d849..9a1a4b1 100644 --- a/chrome/renderer/plugins/missing_plugin.cc +++ b/chrome/renderer/plugins/missing_plugin.cc @@ -147,6 +147,8 @@ bool MissingPlugin::OnMessageReceived(const IPC::Message& message) { OnStartedDownloadingPlugin) IPC_MESSAGE_HANDLER(ChromeViewMsg_FinishedDownloadingPlugin, OnFinishedDownloadingPlugin) + IPC_MESSAGE_HANDLER(ChromeViewMsg_ErrorDownloadingPlugin, + OnErrorDownloadingPlugin) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() @@ -170,6 +172,11 @@ void MissingPlugin::OnStartedDownloadingPlugin() { void MissingPlugin::OnFinishedDownloadingPlugin() { SetMessage(l10n_util::GetStringUTF16(IDS_PLUGIN_INSTALLING)); } + +void MissingPlugin::OnErrorDownloadingPlugin(const std::string& error) { + SetMessage(l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOAD_ERROR, + UTF8ToUTF16(error))); +} #endif // defined(ENABLE_PLUGIN_INSTALLATION) void MissingPlugin::PluginListChanged() { diff --git a/chrome/renderer/plugins/missing_plugin.h b/chrome/renderer/plugins/missing_plugin.h index 2d7c1f5..69936f2 100644 --- a/chrome/renderer/plugins/missing_plugin.h +++ b/chrome/renderer/plugins/missing_plugin.h @@ -54,6 +54,7 @@ class MissingPlugin : public PluginPlaceholder, void OnFoundMissingPlugin(const string16& plugin_name); void OnStartedDownloadingPlugin(); void OnFinishedDownloadingPlugin(); + void OnErrorDownloadingPlugin(const std::string& error); #endif void SetMessage(const string16& message); |