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

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 13548005: Add UMA reporting on failure to load ppapi plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix gypi Created 7 years, 9 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
« content/content_ppapi_plugin.gypi ('K') | « content/content_ppapi_plugin.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_thread.cc
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 0f718af44edd5edda20a78326bc4208c91d785ab..13559ba1fc8d09651e8342352dcb7b0f7d9ff9df 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/debug/crash_logging.h"
#include "base/logging.h"
+#include "base/metrics/histogram.h"
#include "base/process_util.h"
#include "base/rand_util.h"
#include "base/stringprintf.h"
@@ -40,6 +41,8 @@
#include "ui/base/ui_base_switches.h"
#include "webkit/plugins/plugin_switches.h"
+#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
+
#if defined(OS_WIN)
#include "base/win/win_util.h"
#include "sandbox/win/src/sandbox.h"
@@ -256,7 +259,14 @@ void PpapiThread::OnLoadPlugin(const base::FilePath& path,
// Load the plugin from the specified library.
std::string error;
library.Reset(base::LoadNativeLibrary(path, &error));
- if (!library.is_valid()) {
+ bool success = library.is_valid();
+
+#if defined(WIDEVINE_CDM_AVAILABLE)
+ if (path.BaseName().value() == kWidevineCdmPluginFileName)
+ UMA_HISTOGRAM_BOOLEAN("PluginLoad.Widevine", success);
+#endif // defined(WIDEVINE_CDM_AVAILABLE)
+
ddorwin 2013/04/04 19:30:14 Should we add other Pepper plugins as well? There
xhwang 2013/04/04 19:42:45 I'd like to see if this works well before we add m
+ if (!success) {
LOG(ERROR) << "Failed to load Pepper module from "
<< path.value() << " (error: " << error << ")";
return;
« content/content_ppapi_plugin.gypi ('K') | « content/content_ppapi_plugin.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698