| Index: net/url_request/url_request_simple_job.cc
|
| diff --git a/net/url_request/url_request_simple_job.cc b/net/url_request/url_request_simple_job.cc
|
| index b50bbc8173b0c76bbc1503f2151ef439ff4aea55..46d9c38a9440500710f9486db003d6bd06ea514c 100644
|
| --- a/net/url_request/url_request_simple_job.cc
|
| +++ b/net/url_request/url_request_simple_job.cc
|
| @@ -10,7 +10,6 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/ref_counted_memory.h"
|
| #include "base/message_loop/message_loop.h"
|
| -#include "base/profiler/scoped_tracker.h"
|
| #include "base/threading/worker_pool.h"
|
| #include "net/base/io_buffer.h"
|
| #include "net/base/net_errors.h"
|
| @@ -26,10 +25,6 @@ void CopyData(const scoped_refptr<IOBuffer>& buf,
|
| int buf_size,
|
| const scoped_refptr<base::RefCountedMemory>& data,
|
| 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);
|
| }
|
|
|
| @@ -65,11 +60,6 @@ URLRequestSimpleJob::~URLRequestSimpleJob() {}
|
|
|
| bool URLRequestSimpleJob::ReadRawData(IOBuffer* buf, int buf_size,
|
| 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);
|
| buf_size = static_cast<int>(
|
| std::min(static_cast<int64>(buf_size),
|
| @@ -124,11 +114,6 @@ void URLRequestSimpleJob::StartAsync() {
|
| return;
|
|
|
| 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,
|
| ERR_REQUEST_RANGE_NOT_SATISFIABLE));
|
| return;
|
| @@ -137,36 +122,16 @@ void URLRequestSimpleJob::StartAsync() {
|
| if (!ranges().empty() && range_parse_result() == OK)
|
| byte_range_ = ranges().front();
|
|
|
| - int result;
|
| - {
|
| - // TODO(vadimt): Remove ScopedTracker below once crbug.com/422489 is fixed.
|
| - // Remove the block and assign 'result' in its declaration.
|
| - 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"));
|
| + const int result =
|
| + GetRefCountedData(&mime_type_, &charset_, &data_,
|
| + base::Bind(&URLRequestSimpleJob::OnGetDataCompleted,
|
| + weak_factory_.GetWeakPtr()));
|
|
|
| + if (result != ERR_IO_PENDING)
|
| OnGetDataCompleted(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) {
|
| // Notify that the headers are complete
|
| if (!byte_range_.ComputeBounds(data_->size())) {
|
|
|