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

Side by Side Diff: media/formats/webm/webm_content_encodings_client.cc

Issue 2234753002: media: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 "media/formats/webm/webm_content_encodings_client.h" 5 #include "media/formats/webm/webm_content_encodings_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "media/formats/webm/webm_constants.h" 9 #include "media/formats/webm/webm_constants.h"
10 10
11 namespace media { 11 namespace media {
12 12
13 WebMContentEncodingsClient::WebMContentEncodingsClient( 13 WebMContentEncodingsClient::WebMContentEncodingsClient(
14 const scoped_refptr<MediaLog>& media_log) 14 const scoped_refptr<MediaLog>& media_log)
15 : media_log_(media_log), 15 : media_log_(media_log),
16 content_encryption_encountered_(false), 16 content_encryption_encountered_(false),
17 content_encodings_ready_(false) { 17 content_encodings_ready_(false) {
18 } 18 }
19 19
20 WebMContentEncodingsClient::~WebMContentEncodingsClient() { 20 WebMContentEncodingsClient::~WebMContentEncodingsClient() {
21 STLDeleteElements(&content_encodings_); 21 base::STLDeleteElements(&content_encodings_);
22 } 22 }
23 23
24 const ContentEncodings& WebMContentEncodingsClient::content_encodings() const { 24 const ContentEncodings& WebMContentEncodingsClient::content_encodings() const {
25 DCHECK(content_encodings_ready_); 25 DCHECK(content_encodings_ready_);
26 return content_encodings_; 26 return content_encodings_;
27 } 27 }
28 28
29 WebMParserClient* WebMContentEncodingsClient::OnListStart(int id) { 29 WebMParserClient* WebMContentEncodingsClient::OnListStart(int id) {
30 if (id == kWebMIdContentEncodings) { 30 if (id == kWebMIdContentEncodings) {
31 DCHECK(!cur_content_encoding_.get()); 31 DCHECK(!cur_content_encoding_.get());
32 DCHECK(!content_encryption_encountered_); 32 DCHECK(!content_encryption_encountered_);
33 STLDeleteElements(&content_encodings_); 33 base::STLDeleteElements(&content_encodings_);
34 content_encodings_ready_ = false; 34 content_encodings_ready_ = false;
35 return this; 35 return this;
36 } 36 }
37 37
38 if (id == kWebMIdContentEncoding) { 38 if (id == kWebMIdContentEncoding) {
39 DCHECK(!cur_content_encoding_.get()); 39 DCHECK(!cur_content_encoding_.get());
40 DCHECK(!content_encryption_encountered_); 40 DCHECK(!content_encryption_encountered_);
41 cur_content_encoding_.reset(new ContentEncoding()); 41 cur_content_encoding_.reset(new ContentEncoding());
42 return this; 42 return this;
43 } 43 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 cur_content_encoding_->SetEncryptionKeyId(data, size); 267 cur_content_encoding_->SetEncryptionKeyId(data, size);
268 return true; 268 return true;
269 } 269 }
270 270
271 // This should not happen if WebMListParser is working properly. 271 // This should not happen if WebMListParser is working properly.
272 DCHECK(false); 272 DCHECK(false);
273 return false; 273 return false;
274 } 274 }
275 275
276 } // namespace media 276 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp2t/mp2t_stream_parser.cc ('k') | media/gpu/dxva_video_decode_accelerator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698