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

Unified Diff: chrome/renderer/plugins/plugin_uma.cc

Issue 23606022: Move renderer plugin code into a new component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move renderer plugin code into a new component - fix ios builds Created 7 years, 2 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/renderer/plugins/plugin_uma.h ('k') | chrome/renderer/plugins/plugin_uma_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/plugins/plugin_uma.cc
diff --git a/chrome/renderer/plugins/plugin_uma.cc b/chrome/renderer/plugins/plugin_uma.cc
index b6c876473c54a2a97e0d55434fa9b012e1978e09..37fc323b94b8591d11281555345cb39bac4e5a17 100644
--- a/chrome/renderer/plugins/plugin_uma.cc
+++ b/chrome/renderer/plugins/plugin_uma.cc
@@ -23,32 +23,15 @@ const char kQuickTimeType[] = "video/quicktime";
// Arrays containing file extensions connected with specific plugins.
// Note: THE ARRAYS MUST BE SORTED BECAUSE BINARY SEARCH IS USED ON THEM!
-const char* kWindowsMediaPlayerExtensions[] = {
- ".asx"
-};
+const char* kWindowsMediaPlayerExtensions[] = {".asx"};
-const char* kRealPlayerExtensions[] = {
- ".ra",
- ".ram",
- ".rm",
- ".rmm",
- ".rmp",
- ".rpm"
-};
+const char* kRealPlayerExtensions[] = {".ra", ".ram", ".rm",
+ ".rmm", ".rmp", ".rpm"};
-const char* kQuickTimeExtensions[] = {
- ".moov",
- ".mov",
- ".qif",
- ".qt",
- ".qti",
- ".qtif"
-};
+const char* kQuickTimeExtensions[] = {".moov", ".mov", ".qif",
+ ".qt", ".qti", ".qtif"};
-const char* kShockwaveFlashExtensions[] = {
- ".spl",
- ".swf"
-};
+const char* kShockwaveFlashExtensions[] = {".spl", ".swf"};
} // namespace.
@@ -83,23 +66,22 @@ PluginUMAReporter* PluginUMAReporter::GetInstance() {
return Singleton<PluginUMAReporter>::get();
}
-void PluginUMAReporter::ReportPluginMissing(
- const std::string& plugin_mime_type, const GURL& plugin_src) {
+void PluginUMAReporter::ReportPluginMissing(const std::string& plugin_mime_type,
+ const GURL& plugin_src) {
report_sender_->SendPluginUMA(MISSING_PLUGIN,
GetPluginType(plugin_mime_type, plugin_src));
}
void PluginUMAReporter::ReportPluginDisabled(
- const std::string& plugin_mime_type, const GURL& plugin_src) {
+ const std::string& plugin_mime_type,
+ const GURL& plugin_src) {
report_sender_->SendPluginUMA(DISABLED_PLUGIN,
GetPluginType(plugin_mime_type, plugin_src));
}
-PluginUMAReporter::PluginUMAReporter() : report_sender_(new UMASenderImpl()) {
-}
+PluginUMAReporter::PluginUMAReporter() : report_sender_(new UMASenderImpl()) {}
-PluginUMAReporter::~PluginUMAReporter() {
-}
+PluginUMAReporter::~PluginUMAReporter() {}
// static.
bool PluginUMAReporter::CompareCStrings(const char* first, const char* second) {
@@ -129,7 +111,8 @@ void PluginUMAReporter::ExtractFileExtension(const GURL& src,
}
PluginUMAReporter::PluginType PluginUMAReporter::GetPluginType(
- const std::string& plugin_mime_type, const GURL& plugin_src) {
+ const std::string& plugin_mime_type,
+ const GURL& plugin_src) {
// If we know plugin's mime type, we use it to determine plugin's type. Else,
// we try to determine plugin type using plugin source's extension.
if (!plugin_mime_type.empty())
« no previous file with comments | « chrome/renderer/plugins/plugin_uma.h ('k') | chrome/renderer/plugins/plugin_uma_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698