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

Side by Side Diff: content/renderer/pepper/content_decryptor_delegate.cc

Issue 1050823009: Handle all possible cdm::Status values before passing through Pepper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | media/cdm/ppapi/cdm_adapter.cc » ('j') | media/cdm/ppapi/cdm_adapter.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/renderer/pepper/content_decryptor_delegate.h" 5 #include "content/renderer/pepper/content_decryptor_delegate.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/message_loop/message_loop_proxy.h" 8 #include "base/message_loop/message_loop_proxy.h"
9 #include "base/metrics/sparse_histogram.h" 9 #include "base/metrics/sparse_histogram.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 case PP_DECRYPTRESULT_SUCCESS: 206 case PP_DECRYPTRESULT_SUCCESS:
207 return Decryptor::kSuccess; 207 return Decryptor::kSuccess;
208 case PP_DECRYPTRESULT_DECRYPT_NOKEY: 208 case PP_DECRYPTRESULT_DECRYPT_NOKEY:
209 return Decryptor::kNoKey; 209 return Decryptor::kNoKey;
210 case PP_DECRYPTRESULT_NEEDMOREDATA: 210 case PP_DECRYPTRESULT_NEEDMOREDATA:
211 return Decryptor::kNeedMoreData; 211 return Decryptor::kNeedMoreData;
212 case PP_DECRYPTRESULT_DECRYPT_ERROR: 212 case PP_DECRYPTRESULT_DECRYPT_ERROR:
213 return Decryptor::kError; 213 return Decryptor::kError;
214 case PP_DECRYPTRESULT_DECODE_ERROR: 214 case PP_DECRYPTRESULT_DECODE_ERROR:
215 return Decryptor::kError; 215 return Decryptor::kError;
216 case PP_DECRYPTRESULT_SESSION_ERROR:
217 return Decryptor::kError;
218 case PP_DECRYPTRESULT_DEFERRED_INITIALIZATION:
219 return Decryptor::kError;
216 default: 220 default:
217 NOTREACHED(); 221 NOTREACHED();
218 return Decryptor::kError; 222 return Decryptor::kError;
219 } 223 }
220 } 224 }
221 225
222 PP_DecryptorStreamType MediaDecryptorStreamTypeToPpStreamType( 226 PP_DecryptorStreamType MediaDecryptorStreamTypeToPpStreamType(
223 Decryptor::StreamType stream_type) { 227 Decryptor::StreamType stream_type) {
224 switch (stream_type) { 228 switch (stream_type) {
225 case Decryptor::kAudio: 229 case Decryptor::kAudio:
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 empty_frames); 1292 empty_frames);
1289 } 1293 }
1290 1294
1291 if (!video_decode_cb_.is_null()) 1295 if (!video_decode_cb_.is_null())
1292 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL); 1296 video_decode_cb_.ResetAndReturn().Run(media::Decryptor::kError, NULL);
1293 1297
1294 cdm_promise_adapter_.Clear(); 1298 cdm_promise_adapter_.Clear();
1295 } 1299 }
1296 1300
1297 } // namespace content 1301 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/cdm/ppapi/cdm_adapter.cc » ('j') | media/cdm/ppapi/cdm_adapter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698