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

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

Issue 11615002: Exclude PluginService for builds with enable_plugins==0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Excluded more files. Avoid sending ViewHostMsg_GetPlugins Created 8 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
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 635fdb4d4ab5ec39705d822c42cff1c1a0c6bc57..c31e64560cbb625611b7d6061c691ce9b481eee4 100644
--- a/chrome/browser/ui/webui/version_handler.cc
+++ b/chrome/browser/ui/webui/version_handler.cc
@@ -61,11 +61,13 @@ void VersionHandler::RegisterMessages() {
}
void VersionHandler::HandleRequestVersionInfo(const ListValue* args) {
+#if defined(ENABLE_PLUGINS)
// The Flash version information is needed in the response, so make sure
// the plugins are loaded.
content::PluginService::GetInstance()->GetPlugins(
base::Bind(&VersionHandler::OnGotPlugins,
weak_ptr_factory_.GetWeakPtr()));
+#endif
// Grab the executable path on the FILE thread. It is returned in
// OnGotFilePaths.
@@ -126,7 +128,6 @@ void VersionHandler::OnGotFilePaths(string16* executable_path_data,
void VersionHandler::OnGotPlugins(
const std::vector<webkit::WebPluginInfo>& plugins) {
-#if !defined(OS_ANDROID)
// Obtain the version of the first enabled Flash plugin.
std::vector<webkit::WebPluginInfo> info_array;
content::PluginService::GetInstance()->GetPluginInfoArray(
@@ -146,5 +147,4 @@ void VersionHandler::OnGotPlugins(
StringValue arg(flash_version);
web_ui()->CallJavascriptFunction("returnFlashVersion", arg);
-#endif
}

Powered by Google App Engine
This is Rietveld 408576698