Commit 500c3d5d authored by vadimt's avatar vadimt Committed by Commit bot

Undoing instrumentations since the bug is fixed.

BUG=422489
TBR=mmenke

Review URL: https://codereview.chromium.org/889653004

Cr-Commit-Position: refs/heads/master@{#314038}
parent aa02e0fc
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/memory/ref_counted_memory.h" #include "base/memory/ref_counted_memory.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/profiler/scoped_tracker.h"
#include "base/threading/worker_pool.h" #include "base/threading/worker_pool.h"
#include "net/base/io_buffer.h" #include "net/base/io_buffer.h"
#include "net/base/net_errors.h" #include "net/base/net_errors.h"
...@@ -26,10 +25,6 @@ void CopyData(const scoped_refptr<IOBuffer>& buf, ...@@ -26,10 +25,6 @@ void CopyData(const scoped_refptr<IOBuffer>& buf,
int buf_size, int buf_size,
const scoped_refptr<base::RefCountedMemory>& data, const scoped_refptr<base::RefCountedMemory>& data,
int64 data_offset) { int64 data_offset) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422489 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION("422489 CopyData"));
memcpy(buf->data(), data->front() + data_offset, buf_size); memcpy(buf->data(), data->front() + data_offset, buf_size);
} }
...@@ -65,11 +60,6 @@ URLRequestSimpleJob::~URLRequestSimpleJob() {} ...@@ -65,11 +60,6 @@ URLRequestSimpleJob::~URLRequestSimpleJob() {}
bool URLRequestSimpleJob::ReadRawData(IOBuffer* buf, int buf_size, bool URLRequestSimpleJob::ReadRawData(IOBuffer* buf, int buf_size,
int* bytes_read) { int* bytes_read) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422489 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422489 URLRequestSimpleJob::ReadRawData"));
DCHECK(bytes_read); DCHECK(bytes_read);
buf_size = static_cast<int>( buf_size = static_cast<int>(
std::min(static_cast<int64>(buf_size), std::min(static_cast<int64>(buf_size),
...@@ -124,11 +114,6 @@ void URLRequestSimpleJob::StartAsync() { ...@@ -124,11 +114,6 @@ void URLRequestSimpleJob::StartAsync() {
return; return;
if (ranges().size() > 1) { if (ranges().size() > 1) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422489 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422489 URLRequestSimpleJob::StartAsync 1"));
NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, NotifyDone(URLRequestStatus(URLRequestStatus::FAILED,
ERR_REQUEST_RANGE_NOT_SATISFIABLE)); ERR_REQUEST_RANGE_NOT_SATISFIABLE));
return; return;
...@@ -137,36 +122,16 @@ void URLRequestSimpleJob::StartAsync() { ...@@ -137,36 +122,16 @@ void URLRequestSimpleJob::StartAsync() {
if (!ranges().empty() && range_parse_result() == OK) if (!ranges().empty() && range_parse_result() == OK)
byte_range_ = ranges().front(); byte_range_ = ranges().front();
int result; const int result =
{ GetRefCountedData(&mime_type_, &charset_, &data_,
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422489 is fixed. base::Bind(&URLRequestSimpleJob::OnGetDataCompleted,
// Remove the block and assign 'result' in its declaration. weak_factory_.GetWeakPtr()));
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422489 URLRequestSimpleJob::StartAsync 2"));
result =
GetRefCountedData(&mime_type_, &charset_, &data_,
base::Bind(&URLRequestSimpleJob::OnGetDataCompleted,
weak_factory_.GetWeakPtr()));
}
if (result != ERR_IO_PENDING) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422489 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422489 URLRequestSimpleJob::StartAsync 3"));
if (result != ERR_IO_PENDING)
OnGetDataCompleted(result); OnGetDataCompleted(result);
}
} }
void URLRequestSimpleJob::OnGetDataCompleted(int result) { void URLRequestSimpleJob::OnGetDataCompleted(int result) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422489 is fixed.
tracked_objects::ScopedTracker tracking_profile(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"422489 URLRequestSimpleJob::OnGetDataCompleted"));
if (result == OK) { if (result == OK) {
// Notify that the headers are complete // Notify that the headers are complete
if (!byte_range_.ComputeBounds(data_->size())) { if (!byte_range_.ComputeBounds(data_->size())) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment