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

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

Issue 10990078: Cleanup: Use plugin constants in more places. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 3 months 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/policy/policy_browsertest.cc ('k') | chrome/browser/ui/webui/version_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/flash_ui.cc
===================================================================
--- chrome/browser/ui/webui/flash_ui.cc (revision 159101)
+++ chrome/browser/ui/webui/flash_ui.cc (working copy)
@@ -41,6 +41,7 @@
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+#include "webkit/plugins/plugin_constants.h"
#include "webkit/plugins/webplugininfo.h"
#if defined(OS_WIN)
@@ -55,6 +56,8 @@
namespace {
+const char kFlashPlugin[] = "Flash plugin";
+
ChromeWebUIDataSource* CreateFlashUIHTMLSource() {
ChromeWebUIDataSource* source =
new ChromeWebUIDataSource(chrome::kChromeUIFlashHost);
@@ -267,10 +270,10 @@
// Obtain the version of the Flash plugins.
std::vector<webkit::WebPluginInfo> info_array;
PluginService::GetInstance()->GetPluginInfoArray(
- GURL(), "application/x-shockwave-flash", false, &info_array, NULL);
+ GURL(), kFlashPluginSwfMimeType, false, &info_array, NULL);
string16 flash_version;
if (info_array.empty()) {
- AddPair(list, ASCIIToUTF16("Flash plugin"), "Disabled");
+ AddPair(list, ASCIIToUTF16(kFlashPlugin), "Disabled");
} else {
PluginPrefs* plugin_prefs =
PluginPrefs::GetForProfile(Profile::FromWebUI(web_ui()));
@@ -280,7 +283,7 @@
info_array[i].path.LossyDisplayName();
if (i != 0)
flash_version += ASCIIToUTF16(" (not used)");
- AddPair(list, ASCIIToUTF16("Flash plugin"), flash_version);
+ AddPair(list, ASCIIToUTF16(kFlashPlugin), flash_version);
}
}
}
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/ui/webui/version_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698