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

Side by Side Diff: media/blink/cdm_result_promise_helper.h

Issue 2568463003: media: Rename MediaKeys to ContentDecryptionModule (Closed)
Patch Set: comments addressed Created 4 years 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
« no previous file with comments | « media/base/mock_filters.h ('k') | media/blink/cdm_session_adapter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef MEDIA_BLINK_CDM_RESULT_PROMISE_HELPER_H_ 5 #ifndef MEDIA_BLINK_CDM_RESULT_PROMISE_HELPER_H_
6 #define MEDIA_BLINK_CDM_RESULT_PROMISE_HELPER_H_ 6 #define MEDIA_BLINK_CDM_RESULT_PROMISE_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "media/base/cdm_promise.h" 10 #include "media/base/cdm_promise.h"
11 #include "media/blink/media_blink_export.h" 11 #include "media/blink/media_blink_export.h"
12 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" 12 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
13 13
14 namespace media { 14 namespace media {
15 15
16 // A superset of media::MediaKeys::Exception for UMA reporting. These values 16 // A superset of media::ContentDecryptionModule::Exception for UMA reporting.
17 // should never be changed as it will affect existing reporting, and must match 17 // These values should never be changed as it will affect existing reporting,
18 // the values for CdmPromiseResult in tools/metrics/histograms/histograms.xml. 18 // and must match the values for CdmPromiseResult in
19 // tools/metrics/histograms/histograms.xml.
19 enum CdmResultForUMA { 20 enum CdmResultForUMA {
20 SUCCESS = 0, 21 SUCCESS = 0,
21 NOT_SUPPORTED_ERROR = 1, 22 NOT_SUPPORTED_ERROR = 1,
22 INVALID_STATE_ERROR = 2, 23 INVALID_STATE_ERROR = 2,
23 INVALID_ACCESS_ERROR = 3, 24 INVALID_ACCESS_ERROR = 3,
24 QUOTA_EXCEEDED_ERROR = 4, 25 QUOTA_EXCEEDED_ERROR = 4,
25 UNKNOWN_ERROR = 5, 26 UNKNOWN_ERROR = 5,
26 CLIENT_ERROR = 6, 27 CLIENT_ERROR = 6,
27 OUTPUT_ERROR = 7, 28 OUTPUT_ERROR = 7,
28 NUM_RESULT_CODES 29 NUM_RESULT_CODES
29 }; 30 };
30 31
31 MEDIA_BLINK_EXPORT CdmResultForUMA 32 MEDIA_BLINK_EXPORT CdmResultForUMA
32 ConvertCdmExceptionToResultForUMA(CdmPromise::Exception exception_code); 33 ConvertCdmExceptionToResultForUMA(CdmPromise::Exception exception_code);
33 34
34 MEDIA_BLINK_EXPORT blink::WebContentDecryptionModuleException 35 MEDIA_BLINK_EXPORT blink::WebContentDecryptionModuleException
35 ConvertCdmException(CdmPromise::Exception exception_code); 36 ConvertCdmException(CdmPromise::Exception exception_code);
36 37
37 MEDIA_BLINK_EXPORT void ReportCdmResultUMA(const std::string& uma_name, 38 MEDIA_BLINK_EXPORT void ReportCdmResultUMA(const std::string& uma_name,
38 CdmResultForUMA result); 39 CdmResultForUMA result);
39 40
40 } // namespace media 41 } // namespace media
41 42
42 #endif // MEDIA_BLINK_CDM_RESULT_PROMISE_HELPER_H_ 43 #endif // MEDIA_BLINK_CDM_RESULT_PROMISE_HELPER_H_
OLDNEW
« no previous file with comments | « media/base/mock_filters.h ('k') | media/blink/cdm_session_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698