Index: chrome/plugin/chrome_content_plugin_client.cc |
diff --git a/chrome/plugin/chrome_content_plugin_client.cc b/chrome/plugin/chrome_content_plugin_client.cc |
index c6712ab1502ce6003537ef020cc091626fde878f..ed4ceb81ae8e7eccd37e0dacc5e2977167fb8251 100644 |
--- a/chrome/plugin/chrome_content_plugin_client.cc |
+++ b/chrome/plugin/chrome_content_plugin_client.cc |
@@ -2,7 +2,9 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "base/metrics/histogram.h" |
#include "chrome/plugin/chrome_content_plugin_client.h" |
+#include "third_party/widevine/cdm/widevine_cdm_common.h" |
#if defined(ENABLE_REMOTING) |
#include "base/files/file_path.h" |
@@ -14,8 +16,8 @@ |
#include "base/native_library.h" |
#elif defined(OS_POSIX) && !defined(OS_MACOSX) && defined(USE_NSS) |
#include "crypto/nss_util.h" |
-#endif |
-#endif |
+#endif // defined(OS_WIN) |
+#endif // defined(ENABLE_REMOTING) |
#if defined(OS_MACOSX) |
#include "base/mac/mac_util.h" |
@@ -23,7 +25,7 @@ |
#include "base/strings/sys_string_conversions.h" |
#include "grit/chromium_strings.h" |
#include "ui/base/l10n/l10n_util.h" |
-#endif |
+#endif // defined(OS_MACOSX) |
namespace chrome { |
@@ -67,4 +69,20 @@ void ChromeContentPluginClient::PluginProcessStarted( |
#endif |
} |
+void ChromeContentPluginClient::PluginLoaded(const base::FilePath& plugin_path, |
+ bool is_broker, |
+ PluginLoadResult result) { |
+ base::FilePath::StringType plugin_name = plugin_path.BaseName().value(); |
+ // TODO(xhwang): Add UMA reporting for more ppapi plugins. |
+ if (plugin_name == kWidevineCdmPluginFileName) { |
+ if (!is_broker) { |
+ UMA_HISTOGRAM_ENUMERATION("Plugin.PluginLoadResult.Widevine", result, |
+ ContentPluginClient::LOAD_STATUS_MAX); |
+ } else { |
+ UMA_HISTOGRAM_ENUMERATION("Plugin.BrokerLoadResult.Widevine", result, |
+ ContentPluginClient::LOAD_STATUS_MAX); |
+ } |
+ } |
+} |
+ |
} // namespace chrome |