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

Side by Side Diff: media/base/cdm_promise_adapter.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 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
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 "media/base/cdm_promise_adapter.h" 5 #include "media/base/cdm_promise_adapter.h"
6 6
7 #include "media/base/media_keys.h" 7 #include "media/base/media_keys.h"
8 8
9 namespace media { 9 namespace media {
10 10
(...skipping 28 matching lines...) Expand all
39 if (type != expected) { 39 if (type != expected) {
40 NOTREACHED() << "Promise type mismatch: " << type << " vs " << expected; 40 NOTREACHED() << "Promise type mismatch: " << type << " vs " << expected;
41 return; 41 return;
42 } 42 }
43 43
44 static_cast<CdmPromiseTemplate<T...>*>(promise.get())->resolve(result...); 44 static_cast<CdmPromiseTemplate<T...>*>(promise.get())->resolve(result...);
45 } 45 }
46 46
47 void CdmPromiseAdapter::RejectPromise(uint32_t promise_id, 47 void CdmPromiseAdapter::RejectPromise(uint32_t promise_id,
48 MediaKeys::Exception exception_code, 48 MediaKeys::Exception exception_code,
49 uint32 system_code, 49 uint32_t system_code,
50 const std::string& error_message) { 50 const std::string& error_message) {
51 scoped_ptr<CdmPromise> promise = TakePromise(promise_id); 51 scoped_ptr<CdmPromise> promise = TakePromise(promise_id);
52 if (!promise) { 52 if (!promise) {
53 NOTREACHED() << "No promise found for promise_id " << promise_id; 53 NOTREACHED() << "No promise found for promise_id " << promise_id;
54 return; 54 return;
55 } 55 }
56 56
57 promise->reject(exception_code, system_code, error_message); 57 promise->reject(exception_code, system_code, error_message);
58 } 58 }
59 59
(...skipping 13 matching lines...) Expand all
73 return promises_.take_and_erase(it); 73 return promises_.take_and_erase(it);
74 } 74 }
75 75
76 // Explicit instantiation of function templates. 76 // Explicit instantiation of function templates.
77 template MEDIA_EXPORT void CdmPromiseAdapter::ResolvePromise(uint32_t); 77 template MEDIA_EXPORT void CdmPromiseAdapter::ResolvePromise(uint32_t);
78 template MEDIA_EXPORT void CdmPromiseAdapter::ResolvePromise( 78 template MEDIA_EXPORT void CdmPromiseAdapter::ResolvePromise(
79 uint32_t, 79 uint32_t,
80 const std::string&); 80 const std::string&);
81 81
82 } // namespace media 82 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698