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 f266e3b505d05ea37b7e237ce91e8dbc472c0937..a02da27d2611575585fdcdb037cc11ebf3e67eff 100644 |
--- a/net/url_request/url_request_simple_job.cc |
+++ b/net/url_request/url_request_simple_job.cc |
@@ -9,6 +9,7 @@ |
#include "base/bind.h" |
#include "base/compiler_specific.h" |
#include "base/message_loop/message_loop.h" |
+#include "base/profiler/scoped_profile.h" |
#include "net/base/io_buffer.h" |
#include "net/base/net_errors.h" |
#include "net/http/http_request_headers.h" |
@@ -60,6 +61,11 @@ void URLRequestSimpleJob::StartAsync() { |
return; |
if (ranges().size() > 1) { |
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/422489 is fixed. |
+ tracked_objects::ScopedProfile tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "422489 URLRequestSimpleJob::StartAsync 1")); |
+ |
NotifyDone(URLRequestStatus(URLRequestStatus::FAILED, |
ERR_REQUEST_RANGE_NOT_SATISFIABLE)); |
return; |
@@ -68,11 +74,29 @@ void URLRequestSimpleJob::StartAsync() { |
if (!ranges().empty() && range_parse_result() == OK) |
byte_range_ = ranges().front(); |
- int result = GetData(&mime_type_, &charset_, &data_, |
- base::Bind(&URLRequestSimpleJob::OnGetDataCompleted, |
- weak_factory_.GetWeakPtr())); |
- if (result != ERR_IO_PENDING) |
+ int result; |
+ { |
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/422489 is fixed. |
+ // Remove the block and assign 'result' in its declaration. |
+ tracked_objects::ScopedProfile tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "422489 URLRequestSimpleJob::StartAsync 2")); |
+ |
+ result = GetData(&mime_type_, |
+ &charset_, |
+ &data_, |
+ base::Bind(&URLRequestSimpleJob::OnGetDataCompleted, |
+ weak_factory_.GetWeakPtr())); |
+ } |
+ |
+ if (result != ERR_IO_PENDING) { |
+ // TODO(vadimt): Remove ScopedProfile below once crbug.com/422489 is fixed. |
+ tracked_objects::ScopedProfile tracking_profile( |
+ FROM_HERE_WITH_EXPLICIT_FUNCTION( |
+ "422489 URLRequestSimpleJob::StartAsync 3")); |
+ |
OnGetDataCompleted(result); |
+ } |
} |
void URLRequestSimpleJob::OnGetDataCompleted(int result) { |