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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 1563633002: Make URLRequestJob::SetStatus private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to comments Created 4 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_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 47a0666e3fc7ad50225110e7f394da8adf08c83c..66e52d9d7f2e721cb77ac7232304470af880e5fc 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -470,7 +470,6 @@ void URLRequestHttpJob::MaybeStartTransactionInternal(int result) {
std::string source("delegate");
request_->net_log().AddEvent(NetLog::TYPE_CANCELLED,
NetLog::StringCallback("source", &source));
- NotifyCanceled();
NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, result));
}
}
@@ -651,10 +650,6 @@ void URLRequestHttpJob::AddExtraHeaders() {
}
void URLRequestHttpJob::AddCookieHeaderAndStart() {
- // No matter what, we want to report our status as IO pending since we will
- // be notifying our consumer asynchronously via OnStartCompleted.
- SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
-
// If the request was destroyed, then there is no more work to do.
if (!request_)
return;
@@ -750,10 +745,6 @@ void URLRequestHttpJob::SaveCookiesAndNotifyHeadersComplete(int result) {
// whether it completed synchronously or asynchronously.
// See http://crbug.com/131066.
void URLRequestHttpJob::SaveNextCookie() {
- // No matter what, we want to report our status as IO pending since we will
- // be notifying our consumer asynchronously via OnStartCompleted.
- SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
-
// Used to communicate with the callback. See the implementation of
// OnCookieSaved.
scoped_refptr<SharedBoolean> callback_pending = new SharedBoolean(false);
@@ -795,7 +786,6 @@ void URLRequestHttpJob::SaveNextCookie() {
if (!callback_pending->data) {
response_cookies_.clear();
response_cookies_save_index_ = 0;
- SetStatus(URLRequestStatus()); // Clear the IO_PENDING status
NotifyHeadersComplete();
return;
}
@@ -936,9 +926,6 @@ void URLRequestHttpJob::OnStartCompleted(int result) {
receive_headers_end_ = base::TimeTicks::Now();
- // Clear the IO_PENDING status
- SetStatus(URLRequestStatus());
-
const URLRequestContext* context = request_->context();
if (result == OK) {
@@ -1305,10 +1292,6 @@ void URLRequestHttpJob::ContinueWithCertificate(
ResetTimer();
- // No matter what, we want to report our status as IO pending since we will
- // be notifying our consumer asynchronously via OnStartCompleted.
- SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
-
int rv = transaction_->RestartWithCertificate(client_cert, client_private_key,
start_callback_);
if (rv == ERR_IO_PENDING)
@@ -1331,10 +1314,6 @@ void URLRequestHttpJob::ContinueDespiteLastError() {
ResetTimer();
- // No matter what, we want to report our status as IO pending since we will
- // be notifying our consumer asynchronously via OnStartCompleted.
- SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
-
int rv = transaction_->RestartIgnoringLastError(start_callback_);
if (rv == ERR_IO_PENDING)
return;

Powered by Google App Engine
This is Rietveld 408576698