Remove base::Value::Get{Buffer,Size}

https://codereview.chromium.org/2841623003
This commit is contained in:
Aleksei Kuzmin 2017-08-04 12:12:54 +03:00 committed by Cheng Zhao
parent 132029ea32
commit 58e0771e47
3 changed files with 5 additions and 5 deletions

View file

@ -60,8 +60,8 @@ void URLRequestBufferJob::StartAsync(std::unique_ptr<base::Value> options) {
}
data_ = new base::RefCountedBytes(
reinterpret_cast<const unsigned char*>(binary->GetBuffer()),
binary->GetSize());
reinterpret_cast<const unsigned char*>(binary->GetBlob().data()),
binary->GetBlob().size());
status_code_ = net::HTTP_OK;
net::URLRequestSimpleJob::Start();
}

View file

@ -262,7 +262,7 @@ bool Converter<scoped_refptr<ResourceRequestBodyImpl>>::FromV8(
if (type == "rawData") {
base::Value* bytes = nullptr;
dict->GetBinary("bytes", &bytes);
(*out)->AppendBytes(bytes->GetBuffer(), bytes->GetSize());
(*out)->AppendBytes(bytes->GetBlob().data(), bytes->GetBlob().size());
} else if (type == "file") {
std::string file;
int offset = 0, length = -1;

View file

@ -255,8 +255,8 @@ v8::Local<v8::Value> V8ValueConverter::ToV8Object(
v8::Local<v8::Value> V8ValueConverter::ToArrayBuffer(
v8::Isolate* isolate, const base::Value* value) const {
const char* data = value->GetBuffer();
size_t length = value->GetSize();
const char* data = value->GetBlob().data();
size_t length = value->GetBlob().size();
if (!disable_node_) {
return node::Buffer::Copy(isolate, data, length).ToLocalChecked();