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

Side by Side Diff: net/url_request/url_request_http_job.cc

Issue 1834273002: Add TRACE_EVENT macros to net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/file_version_info.h" 12 #include "base/file_version_info.h"
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/metrics/field_trial.h" 15 #include "base/metrics/field_trial.h"
16 #include "base/metrics/histogram_macros.h" 16 #include "base/metrics/histogram_macros.h"
17 #include "base/profiler/scoped_tracker.h" 17 #include "base/profiler/scoped_tracker.h"
18 #include "base/rand_util.h" 18 #include "base/rand_util.h"
19 #include "base/single_thread_task_runner.h" 19 #include "base/single_thread_task_runner.h"
20 #include "base/strings/string_util.h" 20 #include "base/strings/string_util.h"
21 #include "base/thread_task_runner_handle.h" 21 #include "base/thread_task_runner_handle.h"
22 #include "base/time/time.h" 22 #include "base/time/time.h"
23 #include "base/trace_event/trace_event.h"
23 #include "base/values.h" 24 #include "base/values.h"
24 #include "net/base/host_port_pair.h" 25 #include "net/base/host_port_pair.h"
25 #include "net/base/load_flags.h" 26 #include "net/base/load_flags.h"
26 #include "net/base/net_errors.h" 27 #include "net/base/net_errors.h"
27 #include "net/base/network_delegate.h" 28 #include "net/base/network_delegate.h"
28 #include "net/base/network_quality_estimator.h" 29 #include "net/base/network_quality_estimator.h"
29 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 30 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
30 #include "net/base/sdch_manager.h" 31 #include "net/base/sdch_manager.h"
31 #include "net/base/sdch_net_log_params.h" 32 #include "net/base/sdch_net_log_params.h"
32 #include "net/base/url_util.h" 33 #include "net/base/url_util.h"
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 void URLRequestHttpJob::OnHeadersReceivedCallback(int result) { 1056 void URLRequestHttpJob::OnHeadersReceivedCallback(int result) {
1056 awaiting_callback_ = false; 1057 awaiting_callback_ = false;
1057 1058
1058 // Check that there are no callbacks to already canceled requests. 1059 // Check that there are no callbacks to already canceled requests.
1059 DCHECK_NE(URLRequestStatus::CANCELED, GetStatus().status()); 1060 DCHECK_NE(URLRequestStatus::CANCELED, GetStatus().status());
1060 1061
1061 SaveCookiesAndNotifyHeadersComplete(result); 1062 SaveCookiesAndNotifyHeadersComplete(result);
1062 } 1063 }
1063 1064
1064 void URLRequestHttpJob::OnReadCompleted(int result) { 1065 void URLRequestHttpJob::OnReadCompleted(int result) {
1066 TRACE_EVENT0("net", "URLRequestHttpJob::OnReadCompleted");
mmenke 2016/03/28 20:46:51 What do you expect to do with the information you
ssid 2016/03/29 00:33:06 I am expecting that this data is useful to underst
1065 read_in_progress_ = false; 1067 read_in_progress_ = false;
1066 1068
1067 DCHECK_NE(ERR_IO_PENDING, result); 1069 DCHECK_NE(ERR_IO_PENDING, result);
1068 1070
1069 if (ShouldFixMismatchedContentLength(result)) 1071 if (ShouldFixMismatchedContentLength(result))
1070 result = OK; 1072 result = OK;
1071 1073
1072 // EOF or error, done with this job. 1074 // EOF or error, done with this job.
1073 if (result <= 0) 1075 if (result <= 0)
1074 DoneWithRequest(FINISHED); 1076 DoneWithRequest(FINISHED);
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 return override_response_headers_.get() ? 1631 return override_response_headers_.get() ?
1630 override_response_headers_.get() : 1632 override_response_headers_.get() :
1631 transaction_->GetResponseInfo()->headers.get(); 1633 transaction_->GetResponseInfo()->headers.get();
1632 } 1634 }
1633 1635
1634 void URLRequestHttpJob::NotifyURLRequestDestroyed() { 1636 void URLRequestHttpJob::NotifyURLRequestDestroyed() {
1635 awaiting_callback_ = false; 1637 awaiting_callback_ = false;
1636 } 1638 }
1637 1639
1638 } // namespace net 1640 } // namespace net
OLDNEW
« net/http/http_stream_factory_impl_job.cc ('K') | « net/url_request/url_fetcher_core.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698