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

Unified Diff: media/base/pipeline_status.cc

Issue 10582026: Add UMA reporting for GpuVideoDecoder::Initialize status. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
« no previous file with comments | « media/base/pipeline_status.h ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_status.cc
diff --git a/media/base/pipeline_status.cc b/media/base/pipeline_status.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6c08383cdc9388a961ea7327f409f0b9f10ac5cb
--- /dev/null
+++ b/media/base/pipeline_status.cc
@@ -0,0 +1,24 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "media/base/pipeline_status.h"
+
+#include "base/bind.h"
+#include "base/metrics/histogram.h"
+
+namespace media {
+
+static void ReportAndRun(const std::string& name,
+ const PipelineStatusCB& cb,
+ PipelineStatus status) {
+ UMA_HISTOGRAM_ENUMERATION(name, status, PIPELINE_STATUS_MAX);
+ cb.Run(status);
+}
+
+PipelineStatusCB CreateUMAReportingPipelineCB(const std::string& name,
+ const PipelineStatusCB& cb) {
+ return base::Bind(&ReportAndRun, name, cb);
+}
+
+} // namespace media
« no previous file with comments | « media/base/pipeline_status.h ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698