Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: net/url_request/url_request_simple_job.cc

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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())) {
« no previous file with comments | « net/url_request/sdch_dictionary_fetcher_unittest.cc ('k') | net/websockets/websocket_basic_handshake_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698