Commit d6e43818 authored by thestig's avatar thestig Committed by Commit Bot

Mark plugin requires restart code/resources Linux-only.

Review-Url: https://codereview.chromium.org/2910823002
Cr-Commit-Position: refs/heads/master@{#476477}
parent 279874b4
...@@ -1183,9 +1183,11 @@ Please check your email at <ph name="ACCOUNT_EMAIL">$2<ex>jane.doe@example.com</ ...@@ -1183,9 +1183,11 @@ Please check your email at <ph name="ACCOUNT_EMAIL">$2<ex>jane.doe@example.com</
</message> </message>
<!-- Plugin Placeholders --> <!-- Plugin Placeholders -->
<message name="IDS_PLUGIN_RESTART_REQUIRED" desc="The placeholder text for a plugin that can't be loaded until the browser is restarted."> <if expr="is_linux">
Restart Chromium to enable <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> <message name="IDS_PLUGIN_RESTART_REQUIRED" desc="The placeholder text for a plugin that can't be loaded until the browser is restarted.">
</message> Restart Chromium to enable <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph>
</message>
</if>
<!-- Desktop to iOS promotion --> <!-- Desktop to iOS promotion -->
<message name="IDS_PASSWORD_MANAGER_DESKTOP_TO_IOS_PROMO_TEXT" desc="Text for Chrome iOS Promotion appearing in the password bubble after a password is saved."> <message name="IDS_PASSWORD_MANAGER_DESKTOP_TO_IOS_PROMO_TEXT" desc="Text for Chrome iOS Promotion appearing in the password bubble after a password is saved.">
......
...@@ -1193,9 +1193,11 @@ Please check your email at <ph name="ACCOUNT_EMAIL">$2<ex>jane.doe@example.com</ ...@@ -1193,9 +1193,11 @@ Please check your email at <ph name="ACCOUNT_EMAIL">$2<ex>jane.doe@example.com</
</message> </message>
<!-- Plugin Placeholders --> <!-- Plugin Placeholders -->
<message name="IDS_PLUGIN_RESTART_REQUIRED" desc="The placeholder text for a plugin that can't be loaded until the browser is restarted."> <if expr="is_linux">
Restart Chrome to enable <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph> <message name="IDS_PLUGIN_RESTART_REQUIRED" desc="The placeholder text for a plugin that can't be loaded until the browser is restarted.">
</message> Restart Chrome to enable <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph>
</message>
</if>
<!-- Desktop to iOS promotion --> <!-- Desktop to iOS promotion -->
<message name="IDS_PASSWORD_MANAGER_DESKTOP_TO_IOS_PROMO_TEXT" desc="Text for Chrome iOS Promotion appearing in the password bubble after a password is saved."> <message name="IDS_PASSWORD_MANAGER_DESKTOP_TO_IOS_PROMO_TEXT" desc="Text for Chrome iOS Promotion appearing in the password bubble after a password is saved.">
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <utility> #include <utility>
#include "base/bind.h" #include "base/bind.h"
#include "base/memory/ptr_util.h"
#include "base/memory/singleton.h" #include "base/memory/singleton.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
...@@ -497,10 +498,10 @@ void PluginInfoMessageFilter::ComponentPluginLookupDone( ...@@ -497,10 +498,10 @@ void PluginInfoMessageFilter::ComponentPluginLookupDone(
output->status = output->status =
ChromeViewHostMsg_GetPluginInfo_Status::kRestartRequired; ChromeViewHostMsg_GetPluginInfo_Status::kRestartRequired;
} }
#endif // defined(OS_LINUX) #endif
plugin_metadata.reset(new PluginMetadata( plugin_metadata = base::MakeUnique<PluginMetadata>(
cus_plugin_info->id, cus_plugin_info->name, false, GURL(), GURL(), cus_plugin_info->id, cus_plugin_info->name, false, GURL(), GURL(),
base::ASCIIToUTF16(cus_plugin_info->id), std::string())); base::ASCIIToUTF16(cus_plugin_info->id), std::string());
} }
GetPluginInfoReply(params, std::move(output), std::move(plugin_metadata), GetPluginInfoReply(params, std::move(output), std::move(plugin_metadata),
reply_msg); reply_msg);
......
...@@ -55,7 +55,9 @@ enum class ChromeViewHostMsg_GetPluginInfo_Status { ...@@ -55,7 +55,9 @@ enum class ChromeViewHostMsg_GetPluginInfo_Status {
kOutdatedBlocked, kOutdatedBlocked,
kOutdatedDisallowed, kOutdatedDisallowed,
kPlayImportantContent, kPlayImportantContent,
#if defined(OS_LINUX)
kRestartRequired, kRestartRequired,
#endif
kUnauthorized, kUnauthorized,
}; };
......
...@@ -956,6 +956,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( ...@@ -956,6 +956,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
identifier)); identifier));
break; break;
} }
#if defined(OS_LINUX)
case ChromeViewHostMsg_GetPluginInfo_Status::kRestartRequired: { case ChromeViewHostMsg_GetPluginInfo_Status::kRestartRequired: {
placeholder = create_blocked_plugin( placeholder = create_blocked_plugin(
IDR_BLOCKED_PLUGIN_HTML, IDR_BLOCKED_PLUGIN_HTML,
...@@ -963,6 +964,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( ...@@ -963,6 +964,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name)); group_name));
break; break;
} }
#endif
} }
} }
placeholder->SetStatus(status); placeholder->SetStatus(status);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment