From 6036726eb981b6c4b42047513b9d3f4ac865daac Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 24 Oct 2018 11:30:15 +0200 Subject: BASELINE: Update Chromium to 70.0.3538.78 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie634710bf039e26c1957f4ae45e101bd4c434ae7 Reviewed-by: Michael BrĂ¼ning --- chromium/net/tools/cachetool/cachetool.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'chromium/net/tools/cachetool') diff --git a/chromium/net/tools/cachetool/cachetool.cc b/chromium/net/tools/cachetool/cachetool.cc index 3a6468f0138..1b94ba844b9 100644 --- a/chromium/net/tools/cachetool/cachetool.cc +++ b/chromium/net/tools/cachetool/cachetool.cc @@ -18,7 +18,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" #include "base/strings/stringprintf.h" -#include "base/task_scheduler/task_scheduler.h" +#include "base/task/task_scheduler/task_scheduler.h" #include "net/base/io_buffer.h" #include "net/base/test_completion_callback.h" #include "net/disk_cache/disk_cache.h" @@ -322,7 +322,8 @@ bool GetResponseInfoForEntry(disk_cache::Entry* entry, int size = entry->GetDataSize(kResponseInfoIndex); if (size == 0) return false; - scoped_refptr buffer = new net::IOBufferWithSize(size); + scoped_refptr buffer = + base::MakeRefCounted(size); net::TestCompletionCallback cb; int bytes_read = 0; @@ -357,7 +358,7 @@ std::string GetMD5ForResponseBody(disk_cache::Entry* entry) { const int kInitBufferSize = 80 * 1024; scoped_refptr buffer = - new net::IOBufferWithSize(kInitBufferSize); + base::MakeRefCounted(kInitBufferSize); net::TestCompletionCallback cb; base::MD5Context ctx; @@ -482,7 +483,8 @@ scoped_refptr GetStreamForKeyBuffer( } const int kInitBufferSize = 8192; - scoped_refptr buffer(new net::GrowableIOBuffer()); + scoped_refptr buffer = + base::MakeRefCounted(); buffer->SetCapacity(kInitBufferSize); while (true) { rv = cache_entry->ReadData(index, buffer->offset(), buffer.get(), @@ -555,7 +557,8 @@ void UpdateRawResponseHeaders(CommandMarshal* command_marshal) { std::cerr << "WARNING: Truncated HTTP response." << std::endl; response_info.headers = new net::HttpResponseHeaders(raw_headers); - scoped_refptr data(new net::PickledIOBuffer()); + scoped_refptr data = + base::MakeRefCounted(); response_info.Persist(data->pickle(), false, false); data->Done(); Entry* cache_entry; @@ -585,7 +588,8 @@ void DeleteStreamForKey(CommandMarshal* command_marshal) { if (cb.GetResult(rv) != net::OK) return command_marshal->ReturnFailure("Couldn't find key's entry."); - scoped_refptr buffer(new net::StringIOBuffer("")); + scoped_refptr buffer = + base::MakeRefCounted(""); rv = cache_entry->WriteData(index, 0, buffer.get(), 0, cb.callback(), true); if (cb.GetResult(rv) != net::OK) return command_marshal->ReturnFailure("Couldn't delete key stream."); -- cgit v1.2.1