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

Unified Diff: media/blink/buffered_data_source.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 side-by-side diff with in-line comments
Download patch
Index: media/blink/buffered_data_source.cc
diff --git a/media/blink/buffered_data_source.cc b/media/blink/buffered_data_source.cc
index 18f364d965698e299c5976f5fe490d3daafbd059..2766aed9db7386876e5626797b534c1f8757c8d8 100644
--- a/media/blink/buffered_data_source.cc
+++ b/media/blink/buffered_data_source.cc
@@ -33,7 +33,9 @@ namespace media {
class BufferedDataSource::ReadOperation {
public:
- ReadOperation(int64 position, int size, uint8* data,
+ ReadOperation(int64_t position,
+ int size,
+ uint8_t* data,
const DataSource::ReadCB& callback);
~ReadOperation();
@@ -45,23 +47,25 @@ class BufferedDataSource::ReadOperation {
int retries() { return retries_; }
void IncrementRetries() { ++retries_; }
- int64 position() { return position_; }
+ int64_t position() { return position_; }
int size() { return size_; }
- uint8* data() { return data_; }
+ uint8_t* data() { return data_; }
private:
int retries_;
- const int64 position_;
+ const int64_t position_;
const int size_;
- uint8* data_;
+ uint8_t* data_;
DataSource::ReadCB callback_;
DISALLOW_IMPLICIT_CONSTRUCTORS(ReadOperation);
};
BufferedDataSource::ReadOperation::ReadOperation(
- int64 position, int size, uint8* data,
+ int64_t position,
+ int size,
+ uint8_t* data,
const DataSource::ReadCB& callback)
: retries_(0),
position_(position),
@@ -128,7 +132,8 @@ bool BufferedDataSource::assume_fully_buffered() {
// This method can be overridden to inject mock BufferedResourceLoader object
// for testing purpose.
BufferedResourceLoader* BufferedDataSource::CreateResourceLoader(
- int64 first_byte_position, int64 last_byte_position) {
+ int64_t first_byte_position,
+ int64_t last_byte_position) {
DCHECK(render_task_runner_->BelongsToCurrentThread());
BufferedResourceLoader::DeferStrategy strategy = preload_ == METADATA ?
@@ -253,9 +258,10 @@ int64_t BufferedDataSource::GetMemoryUsage() const {
return loader_ ? loader_->GetMemoryUsage() : 0;
}
-void BufferedDataSource::Read(
- int64 position, int size, uint8* data,
- const DataSource::ReadCB& read_cb) {
+void BufferedDataSource::Read(int64_t position,
+ int size,
+ uint8_t* data,
+ const DataSource::ReadCB& read_cb) {
DVLOG(1) << "Read: " << position << " offset, " << size << " bytes";
DCHECK(!read_cb.is_null());
@@ -276,7 +282,7 @@ void BufferedDataSource::Read(
base::Bind(&BufferedDataSource::ReadTask, weak_factory_.GetWeakPtr()));
}
-bool BufferedDataSource::GetSize(int64* size_out) {
+bool BufferedDataSource::GetSize(int64_t* size_out) {
if (total_bytes_ != kPositionNotSpecified) {
*size_out = total_bytes_;
return true;
@@ -330,7 +336,7 @@ void BufferedDataSource::SetBitrateTask(int bitrate) {
// prior to make this method call.
void BufferedDataSource::ReadInternal() {
DCHECK(render_task_runner_->BelongsToCurrentThread());
- int64 position = 0;
+ int64_t position = 0;
int size = 0;
{
base::AutoLock auto_lock(lock_);
@@ -554,7 +560,7 @@ void BufferedDataSource::LoadingStateChangedCallback(
downloading_cb_.Run(is_downloading_data);
}
-void BufferedDataSource::ProgressCallback(int64 position) {
+void BufferedDataSource::ProgressCallback(int64_t position) {
DCHECK(render_task_runner_->BelongsToCurrentThread());
if (assume_fully_buffered())

Powered by Google App Engine
This is Rietveld 408576698