| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/renderer/plugins/plugin_uma.h" | 5 #include "chrome/renderer/plugins/plugin_uma.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 default: | 59 default: |
| 60 NOTREACHED(); | 60 NOTREACHED(); |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 | 63 |
| 64 // static. | 64 // static. |
| 65 PluginUMAReporter* PluginUMAReporter::GetInstance() { | 65 PluginUMAReporter* PluginUMAReporter::GetInstance() { |
| 66 return base::Singleton<PluginUMAReporter>::get(); | 66 return base::Singleton<PluginUMAReporter>::get(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 // static | |
| 70 void PluginUMAReporter::ReportPDFLoadStatus(PDFLoadStatus status) { | |
| 71 UMA_HISTOGRAM_ENUMERATION("PDF.LoadStatus", status, | |
| 72 PluginUMAReporter::PDF_LOAD_STATUS_COUNT); | |
| 73 } | |
| 74 | |
| 75 void PluginUMAReporter::ReportPluginMissing(const std::string& plugin_mime_type, | 69 void PluginUMAReporter::ReportPluginMissing(const std::string& plugin_mime_type, |
| 76 const GURL& plugin_src) { | 70 const GURL& plugin_src) { |
| 77 report_sender_->SendPluginUMA(MISSING_PLUGIN, | 71 report_sender_->SendPluginUMA(MISSING_PLUGIN, |
| 78 GetPluginType(plugin_mime_type, plugin_src)); | 72 GetPluginType(plugin_mime_type, plugin_src)); |
| 79 } | 73 } |
| 80 | 74 |
| 81 void PluginUMAReporter::ReportPluginDisabled( | 75 void PluginUMAReporter::ReportPluginDisabled( |
| 82 const std::string& plugin_mime_type, | 76 const std::string& plugin_mime_type, |
| 83 const GURL& plugin_src) { | 77 const GURL& plugin_src) { |
| 84 report_sender_->SendPluginUMA(DISABLED_PLUGIN, | 78 report_sender_->SendPluginUMA(DISABLED_PLUGIN, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 return SHOCKWAVE_FLASH; | 179 return SHOCKWAVE_FLASH; |
| 186 } | 180 } |
| 187 | 181 |
| 188 #if BUILDFLAG(ENABLE_PEPPER_CDMS) | 182 #if BUILDFLAG(ENABLE_PEPPER_CDMS) |
| 189 if (mime_type == kWidevineCdmPluginMimeType) | 183 if (mime_type == kWidevineCdmPluginMimeType) |
| 190 return WIDEVINE_CDM; | 184 return WIDEVINE_CDM; |
| 191 #endif | 185 #endif |
| 192 | 186 |
| 193 return UNSUPPORTED_MIMETYPE; | 187 return UNSUPPORTED_MIMETYPE; |
| 194 } | 188 } |
| OLD | NEW |