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

Unified Diff: chrome/plugin/chrome_content_plugin_client.cc

Issue 13548005: Add UMA reporting on failure to load ppapi plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CL refacted. Created 7 years, 8 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
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..8175f74090900f5778d9604bb98fc13670ae3883 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,14 @@ void ChromeContentPluginClient::PluginProcessStarted(
#endif
}
+void ChromeContentPluginClient::PluginLoaded(const base::FilePath& plugin_path,
+ PluginLoadStatus status) {
+ base::FilePath::StringType plugin_name = plugin_path.BaseName().value();
+ // TODO(xhwang): Add UMA reporting for more ppapi plugins.
+ if (plugin_name == kWidevineCdmPluginFileName) {
+ UMA_HISTOGRAM_ENUMERATION("Plugin.LoadStatus.Widevine", status,
+ ContentPluginClient::LOAD_STATUS_MAX);
+ }
+}
+
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698