Index: chrome/browser/ui/webui/version_handler.cc |
diff --git a/chrome/browser/ui/webui/version_handler.cc b/chrome/browser/ui/webui/version_handler.cc |
index bea5fad951372f321d58a2a2d105788331062de4..99952174a77b723fe98654e0ef9e63123c15e621 100644 |
--- a/chrome/browser/ui/webui/version_handler.cc |
+++ b/chrome/browser/ui/webui/version_handler.cc |
@@ -109,20 +109,28 @@ void VersionHandler::OnGotPlugins( |
std::vector<content::WebPluginInfo> info_array; |
content::PluginService::GetInstance()->GetPluginInfoArray( |
GURL(), content::kFlashPluginSwfMimeType, false, &info_array, NULL); |
- base::string16 flash_version = |
+ base::string16 flash_version_and_path = |
l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN); |
Bernhard Bauer
2017/01/03 15:23:17
So, it looks like chrome://version is localized? I
Greg K
2017/01/03 21:20:29
Acknowledged.
|
PluginPrefs* plugin_prefs = |
PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui())).get(); |
if (plugin_prefs) { |
for (size_t i = 0; i < info_array.size(); ++i) { |
if (plugin_prefs->IsPluginEnabled(info_array[i])) { |
- flash_version = info_array[i].version; |
+ flash_version_and_path = info_array[i].version; |
+ flash_version_and_path.append(base::UTF8ToUTF16(" ")); |
Bernhard Bauer
2017/01/03 15:23:17
I would use base::ASCIIToUTF16() for the literal.
Greg K
2017/01/03 21:20:29
I switched this to base::StringPrintf and tested w
|
+#if defined(OS_WIN) |
+ flash_version_and_path.append(info_array[i].path.value()); |
+#else |
+ flash_version_and_path.append( |
+ base::UTF8ToUTF16(info_array[i].path.value())); |
Bernhard Bauer
2017/01/03 15:23:17
Use FilePath::LossyDisplayName() instead of platfo
Greg K
2017/01/03 21:20:29
Done.
|
+#endif // defined(OS_WIN) |
break; |
} |
} |
} |
- base::StringValue arg(flash_version); |
+ base::StringValue arg(flash_version_and_path); |
+ |
web_ui()->CallJavascriptFunctionUnsafe(version_ui::kReturnFlashVersion, arg); |
} |
#endif // BUILDFLAG(ENABLE_PLUGINS) |