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

Side by Side Diff: media/filters/gpu_video_decoder.cc

Issue 148553003: Clean up histogram'd media enum max values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment to ignore violations of PRESUBMIT. Created 6 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 return os_large_video_support && hw_large_video_support; 128 return os_large_video_support && hw_large_video_support;
129 } 129 }
130 130
131 // Report |status| to UMA and run |cb| with it. This is super-specific to the 131 // Report |status| to UMA and run |cb| with it. This is super-specific to the
132 // UMA stat reported because the UMA_HISTOGRAM_ENUMERATION API requires a 132 // UMA stat reported because the UMA_HISTOGRAM_ENUMERATION API requires a
133 // callsite to always be called with the same stat name (can't parameterize it). 133 // callsite to always be called with the same stat name (can't parameterize it).
134 static void ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB( 134 static void ReportGpuVideoDecoderInitializeStatusToUMAAndRunCB(
135 const PipelineStatusCB& cb, 135 const PipelineStatusCB& cb,
136 PipelineStatus status) { 136 PipelineStatus status) {
137 UMA_HISTOGRAM_ENUMERATION( 137 UMA_HISTOGRAM_ENUMERATION(
138 "Media.GpuVideoDecoderInitializeStatus", status, PIPELINE_STATUS_MAX); 138 "Media.GpuVideoDecoderInitializeStatus", status, PIPELINE_STATUS_MAX + 1);
139 cb.Run(status); 139 cb.Run(status);
140 } 140 }
141 141
142 void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config, 142 void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config,
143 const PipelineStatusCB& orig_status_cb) { 143 const PipelineStatusCB& orig_status_cb) {
144 DVLOG(3) << "Initialize()"; 144 DVLOG(3) << "Initialize()";
145 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 145 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
146 DCHECK(config.IsValidConfig()); 146 DCHECK(config.IsValidConfig());
147 DCHECK(!config.is_encrypted()); 147 DCHECK(!config.is_encrypted());
148 148
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 return; 647 return;
648 } 648 }
649 } 649 }
650 650
651 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 651 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
652 const { 652 const {
653 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 653 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
654 } 654 }
655 655
656 } // namespace media 656 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698