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

Side by Side Diff: third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp

Issue 1652983005: Remove Enumeration Histograms from the Blink Platform API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_blink_histograms_5a
Patch Set: Rebase two new histograms were added today Created 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.h" 5 #include "modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.h"
6 6
7 #include "bindings/core/v8/ScriptPromiseResolver.h" 7 #include "bindings/core/v8/ScriptPromiseResolver.h"
8 #include "bindings/core/v8/ScriptState.h" 8 #include "bindings/core/v8/ScriptState.h"
9 #include "core/dom/DOMException.h" 9 #include "core/dom/DOMException.h"
10 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
11 #include "core/dom/ExceptionCode.h" 11 #include "core/dom/ExceptionCode.h"
12 #include "core/frame/OriginsUsingFeatures.h" 12 #include "core/frame/OriginsUsingFeatures.h"
13 #include "core/frame/UseCounter.h" 13 #include "core/frame/UseCounter.h"
14 #include "core/inspector/ConsoleMessage.h" 14 #include "core/inspector/ConsoleMessage.h"
15 #include "modules/encryptedmedia/EncryptedMediaUtils.h" 15 #include "modules/encryptedmedia/EncryptedMediaUtils.h"
16 #include "modules/encryptedmedia/MediaKeySession.h" 16 #include "modules/encryptedmedia/MediaKeySession.h"
17 #include "modules/encryptedmedia/MediaKeySystemAccess.h" 17 #include "modules/encryptedmedia/MediaKeySystemAccess.h"
18 #include "modules/encryptedmedia/MediaKeysController.h" 18 #include "modules/encryptedmedia/MediaKeysController.h"
19 #include "platform/EncryptedMediaRequest.h" 19 #include "platform/EncryptedMediaRequest.h"
20 #include "platform/Histogram.h"
20 #include "platform/Logging.h" 21 #include "platform/Logging.h"
21 #include "platform/network/ParsedContentType.h" 22 #include "platform/network/ParsedContentType.h"
22 #include "public/platform/Platform.h"
23 #include "public/platform/WebEncryptedMediaClient.h" 23 #include "public/platform/WebEncryptedMediaClient.h"
24 #include "public/platform/WebEncryptedMediaRequest.h" 24 #include "public/platform/WebEncryptedMediaRequest.h"
25 #include "public/platform/WebMediaKeySystemConfiguration.h" 25 #include "public/platform/WebMediaKeySystemConfiguration.h"
26 #include "public/platform/WebMediaKeySystemMediaCapability.h" 26 #include "public/platform/WebMediaKeySystemMediaCapability.h"
27 #include "public/platform/WebVector.h" 27 #include "public/platform/WebVector.h"
28 #include "wtf/Vector.h" 28 #include "wtf/Vector.h"
29 #include "wtf/text/WTFString.h" 29 #include "wtf/text/WTFString.h"
30 30
31 namespace blink { 31 namespace blink {
32 32
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 if (capability.robustness.isEmpty()) { 183 if (capability.robustness.isEmpty()) {
184 hasEmptyRobustness = true; 184 hasEmptyRobustness = true;
185 break; 185 break;
186 } 186 }
187 } 187 }
188 188
189 if (hasEmptyRobustness) 189 if (hasEmptyRobustness)
190 break; 190 break;
191 } 191 }
192 192
193 if (hasVideoCapabilities) 193 if (hasVideoCapabilities) {
194 Platform::current()->histogramEnumeration("Media.EME.Widevine.VideoCapab ility.HasEmptyRobustness", hasEmptyRobustness, 2); 194 DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, emptyRobustnessHis togram, new EnumerationHistogram("Media.EME.Widevine.VideoCapability.HasEmptyRob ustness", 2));
195 emptyRobustnessHistogram.count(hasEmptyRobustness);
196 }
195 197
196 if (hasEmptyRobustness) { 198 if (hasEmptyRobustness) {
197 m_resolver->executionContext()->addConsoleMessage(ConsoleMessage::create (JSMessageSource, WarningMessageLevel, 199 m_resolver->executionContext()->addConsoleMessage(ConsoleMessage::create (JSMessageSource, WarningMessageLevel,
198 "It is recommended that a robustness level be specified. Not specify ing the robustness level could " 200 "It is recommended that a robustness level be specified. Not specify ing the robustness level could "
199 "result in unexpected behavior in the future, potentially including failure to play.")); 201 "result in unexpected behavior in the future, potentially including failure to play."));
200 } 202 }
201 } 203 }
202 204
203 } // namespace 205 } // namespace
204 206
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // initialize the MediaKeySystemAccess object. 257 // initialize the MediaKeySystemAccess object.
256 MediaKeysController* controller = MediaKeysController::from(document->page() ); 258 MediaKeysController* controller = MediaKeysController::from(document->page() );
257 WebEncryptedMediaClient* mediaClient = controller->encryptedMediaClient(exec utionContext); 259 WebEncryptedMediaClient* mediaClient = controller->encryptedMediaClient(exec utionContext);
258 mediaClient->requestMediaKeySystemAccess(WebEncryptedMediaRequest(initialize r)); 260 mediaClient->requestMediaKeySystemAccess(WebEncryptedMediaRequest(initialize r));
259 261
260 // 8. Return promise. 262 // 8. Return promise.
261 return promise; 263 return promise;
262 } 264 }
263 265
264 } // namespace blink 266 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698