| 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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 plugin_type, | 55 plugin_type, |
| 56 PluginUMAReporter::PLUGIN_TYPE_MAX); | 56 PluginUMAReporter::PLUGIN_TYPE_MAX); |
| 57 break; | 57 break; |
| 58 default: | 58 default: |
| 59 NOTREACHED(); | 59 NOTREACHED(); |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 | 62 |
| 63 // static. | 63 // static. |
| 64 PluginUMAReporter* PluginUMAReporter::GetInstance() { | 64 PluginUMAReporter* PluginUMAReporter::GetInstance() { |
| 65 return Singleton<PluginUMAReporter>::get(); | 65 return base::Singleton<PluginUMAReporter>::get(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void PluginUMAReporter::ReportPluginMissing(const std::string& plugin_mime_type, | 68 void PluginUMAReporter::ReportPluginMissing(const std::string& plugin_mime_type, |
| 69 const GURL& plugin_src) { | 69 const GURL& plugin_src) { |
| 70 report_sender_->SendPluginUMA(MISSING_PLUGIN, | 70 report_sender_->SendPluginUMA(MISSING_PLUGIN, |
| 71 GetPluginType(plugin_mime_type, plugin_src)); | 71 GetPluginType(plugin_mime_type, plugin_src)); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void PluginUMAReporter::ReportPluginDisabled( | 74 void PluginUMAReporter::ReportPluginDisabled( |
| 75 const std::string& plugin_mime_type, | 75 const std::string& plugin_mime_type, |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 return SHOCKWAVE_FLASH; | 178 return SHOCKWAVE_FLASH; |
| 179 } | 179 } |
| 180 | 180 |
| 181 #if defined(ENABLE_PEPPER_CDMS) | 181 #if defined(ENABLE_PEPPER_CDMS) |
| 182 if (mime_type == kWidevineCdmPluginMimeType) | 182 if (mime_type == kWidevineCdmPluginMimeType) |
| 183 return WIDEVINE_CDM; | 183 return WIDEVINE_CDM; |
| 184 #endif | 184 #endif |
| 185 | 185 |
| 186 return UNSUPPORTED_MIMETYPE; | 186 return UNSUPPORTED_MIMETYPE; |
| 187 } | 187 } |
| OLD | NEW |