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

Unified Diff: media/test/mock_media_source.cc

Issue 2920243002: Declare kAppendWholeFile as constexpr (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/test/mock_media_source.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/test/mock_media_source.cc
diff --git a/media/test/mock_media_source.cc b/media/test/mock_media_source.cc
index b7d904b58d42f3f84ca0a5d3e72b14736e4e9d02..8479cdd3d04b1b23ceb96aecfa93ab5753598313 100644
--- a/media/test/mock_media_source.cc
+++ b/media/test/mock_media_source.cc
@@ -11,7 +11,6 @@
namespace media {
constexpr char kSourceId[] = "SourceId";
-const size_t kAppendWholeFile = std::numeric_limits<size_t>::max();
MockMediaSource::MockMediaSource(const std::string& filename,
const std::string& mimetype,
@@ -30,8 +29,8 @@ MockMediaSource::MockMediaSource(const std::string& filename,
if (initial_append_size_ == kAppendWholeFile)
initial_append_size_ = file_data_->data_size();
- DCHECK_GT(initial_append_size_, 0u);
- DCHECK_LE(initial_append_size_, file_data_->data_size());
+ CHECK_GT(initial_append_size_, 0u);
+ CHECK_LE(initial_append_size_, file_data_->data_size());
}
MockMediaSource::~MockMediaSource() {}
@@ -48,7 +47,7 @@ void MockMediaSource::Seek(base::TimeDelta seek_time,
chunk_demuxer_->ResetParserState(kSourceId, base::TimeDelta(),
kInfiniteDuration, &last_timestamp_offset_);
- DCHECK_LT(new_position, file_data_->data_size());
+ CHECK_LT(new_position, file_data_->data_size());
current_position_ = new_position;
AppendData(seek_append_size);
@@ -59,9 +58,9 @@ void MockMediaSource::Seek(base::TimeDelta seek_time) {
}
void MockMediaSource::AppendData(size_t size) {
- DCHECK(chunk_demuxer_);
- DCHECK_LT(current_position_, file_data_->data_size());
- DCHECK_LE(current_position_ + size, file_data_->data_size());
+ CHECK(chunk_demuxer_);
+ CHECK_LT(current_position_, file_data_->data_size());
+ CHECK_LE(current_position_ + size, file_data_->data_size());
ASSERT_TRUE(chunk_demuxer_->AppendData(
kSourceId, file_data_->data() + current_position_, size,
@@ -170,7 +169,7 @@ ChunkDemuxer::Status MockMediaSource::AddId() {
void MockMediaSource::OnEncryptedMediaInitData(
EmeInitDataType init_data_type,
const std::vector<uint8_t>& init_data) {
- DCHECK(!init_data.empty());
+ CHECK(!init_data.empty());
CHECK(!encrypted_media_init_data_cb_.is_null());
encrypted_media_init_data_cb_.Run(init_data_type, init_data);
}
« no previous file with comments | « media/test/mock_media_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698