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

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

Issue 2743023002: Migrate WTF::Deque::append() to ::push_back() (Closed)
Patch Set: rebase Created 3 years, 9 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 /* 1 /*
2 * Copyright (C) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // parameter. 213 // parameter.
214 DOMArrayBuffer* serverCertificateBuffer = DOMArrayBuffer::create( 214 DOMArrayBuffer* serverCertificateBuffer = DOMArrayBuffer::create(
215 serverCertificate.data(), serverCertificate.byteLength()); 215 serverCertificate.data(), serverCertificate.byteLength());
216 216
217 // 4. Let promise be a new promise. 217 // 4. Let promise be a new promise.
218 SetCertificateResultPromise* result = 218 SetCertificateResultPromise* result =
219 new SetCertificateResultPromise(scriptState, this); 219 new SetCertificateResultPromise(scriptState, this);
220 ScriptPromise promise = result->promise(); 220 ScriptPromise promise = result->promise();
221 221
222 // 5. Run the following steps asynchronously (documented in timerFired()). 222 // 5. Run the following steps asynchronously (documented in timerFired()).
223 m_pendingActions.append(PendingAction::CreatePendingSetServerCertificate( 223 m_pendingActions.push_back(PendingAction::CreatePendingSetServerCertificate(
224 result, serverCertificateBuffer)); 224 result, serverCertificateBuffer));
225 if (!m_timer.isActive()) 225 if (!m_timer.isActive())
226 m_timer.startOneShot(0, BLINK_FROM_HERE); 226 m_timer.startOneShot(0, BLINK_FROM_HERE);
227 227
228 // 6. Return promise. 228 // 6. Return promise.
229 return promise; 229 return promise;
230 } 230 }
231 231
232 bool MediaKeys::reserveForMediaElement(HTMLMediaElement* mediaElement) { 232 bool MediaKeys::reserveForMediaElement(HTMLMediaElement* mediaElement) {
233 // If some other HtmlMediaElement already has a reference to us, fail. 233 // If some other HtmlMediaElement already has a reference to us, fail.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 // Remain around if there are pending events. 311 // Remain around if there are pending events.
312 DVLOG(MEDIA_KEYS_LOG_LEVEL) 312 DVLOG(MEDIA_KEYS_LOG_LEVEL)
313 << __func__ << "(" << this << ")" 313 << __func__ << "(" << this << ")"
314 << (!m_pendingActions.isEmpty() ? " !m_pendingActions.isEmpty()" : "") 314 << (!m_pendingActions.isEmpty() ? " !m_pendingActions.isEmpty()" : "")
315 << (m_reservedForMediaElement ? " m_reservedForMediaElement" : ""); 315 << (m_reservedForMediaElement ? " m_reservedForMediaElement" : "");
316 316
317 return !m_pendingActions.isEmpty() || m_reservedForMediaElement; 317 return !m_pendingActions.isEmpty() || m_reservedForMediaElement;
318 } 318 }
319 319
320 } // namespace blink 320 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698