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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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
« no previous file with comments | « net/url_request/url_request.cc ('k') | ppapi/cpp/private/var_private.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 5c5f24f37a95e937b4fd6fd2154b74f457df1d51..fd78cc571c1f67ac4393f2193ad8d7e41b38e9e2 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -1107,7 +1107,6 @@ std::unique_ptr<SourceStream> URLRequestHttpJob::SetUpSourceStream() {
std::string mime_type;
bool success = GetMimeType(&mime_type);
DCHECK(success || mime_type.empty());
- DCHECK(request());
SdchPolicyDelegate::FixUpSdchContentEncodings(
request()->net_log(), mime_type, dictionaries_advertised_.get(), &types);
@@ -1539,17 +1538,15 @@ void URLRequestHttpJob::DoneWithRequest(CompletionCause reason) {
done_ = true;
// Notify NetworkQualityEstimator.
- if (request()) {
- NetworkQualityEstimator* network_quality_estimator =
- request()->context()->network_quality_estimator();
- if (network_quality_estimator)
- network_quality_estimator->NotifyRequestCompleted(
- *request(), request_->status().error());
+ NetworkQualityEstimator* network_quality_estimator =
+ request()->context()->network_quality_estimator();
+ if (network_quality_estimator) {
+ network_quality_estimator->NotifyRequestCompleted(
+ *request(), request_->status().error());
}
RecordPerfHistograms(reason);
- if (request_)
- request_->set_received_response_content_length(prefilter_bytes_read());
+ request()->set_received_response_content_length(prefilter_bytes_read());
}
HttpResponseHeaders* URLRequestHttpJob::GetResponseHeaders() const {
@@ -1564,12 +1561,10 @@ void URLRequestHttpJob::NotifyURLRequestDestroyed() {
awaiting_callback_ = false;
// Notify NetworkQualityEstimator.
- if (request()) {
- NetworkQualityEstimator* network_quality_estimator =
- request()->context()->network_quality_estimator();
- if (network_quality_estimator)
- network_quality_estimator->NotifyURLRequestDestroyed(*request());
- }
+ NetworkQualityEstimator* network_quality_estimator =
+ request()->context()->network_quality_estimator();
+ if (network_quality_estimator)
+ network_quality_estimator->NotifyURLRequestDestroyed(*request());
}
} // namespace net
« no previous file with comments | « net/url_request/url_request.cc ('k') | ppapi/cpp/private/var_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698