Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4630)

Unified Diff: chrome/browser/ui/webui/version_handler.cc

Issue 2607953002: Add flash plugin path to chrome://version (Closed)
Patch Set: Fix build on windows. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698