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

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: Rebase 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
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/chrome_browser.gypi » ('j') | 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 635fdb4d4ab5ec39705d822c42cff1c1a0c6bc57..160e67797e8380d76438ae4127d407f54b0448dd 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.
@@ -124,9 +126,9 @@ void VersionHandler::OnGotFilePaths(string16* executable_path_data,
web_ui()->CallJavascriptFunction("returnFilePaths", exec_path, profile_path);
}
+#if defined(ENABLE_PLUGINS)
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 +148,5 @@ void VersionHandler::OnGotPlugins(
StringValue arg(flash_version);
web_ui()->CallJavascriptFunction("returnFlashVersion", arg);
-#endif
}
+#endif // defined(ENABLE_PLUGINS)
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698