Commit cc6f61e3 authored by Dominic Farolino's avatar Dominic Farolino Committed by Commit Bot

Stop using |new_response| after assignment

This CL stops referencing the local variable
|new_response| after we assign the private
|new_response_| to it, for consistency.

Bug: N/A
Change-Id: Ide27ddae64cc20e870a6d27e71d9636ab41a7f6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1760578Reviewed-by: default avatarShivani Sharma <shivanisha@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689096}
parent 46f1514c
...@@ -1815,7 +1815,7 @@ int HttpCache::Transaction::DoSuccessfulSendRequest() { ...@@ -1815,7 +1815,7 @@ int HttpCache::Transaction::DoSuccessfulSendRequest() {
// Invalidate any cached GET with a successful PUT or DELETE. // Invalidate any cached GET with a successful PUT or DELETE.
if (mode_ == WRITE && (method_ == "PUT" || method_ == "DELETE")) { if (mode_ == WRITE && (method_ == "PUT" || method_ == "DELETE")) {
if (NonErrorResponse(new_response->headers->response_code()) && if (NonErrorResponse(new_response_->headers->response_code()) &&
(entry_ && !entry_->doomed)) { (entry_ && !entry_->doomed)) {
int ret = cache_->DoomEntry(cache_key_, nullptr); int ret = cache_->DoomEntry(cache_key_, nullptr);
DCHECK_EQ(OK, ret); DCHECK_EQ(OK, ret);
...@@ -1826,11 +1826,11 @@ int HttpCache::Transaction::DoSuccessfulSendRequest() { ...@@ -1826,11 +1826,11 @@ int HttpCache::Transaction::DoSuccessfulSendRequest() {
// Invalidate any cached GET with a successful POST. // Invalidate any cached GET with a successful POST.
if (!(effective_load_flags_ & LOAD_DISABLE_CACHE) && method_ == "POST" && if (!(effective_load_flags_ & LOAD_DISABLE_CACHE) && method_ == "POST" &&
NonErrorResponse(new_response->headers->response_code())) { NonErrorResponse(new_response_->headers->response_code())) {
cache_->DoomMainEntryForUrl(request_->url, request_->network_isolation_key); cache_->DoomMainEntryForUrl(request_->url, request_->network_isolation_key);
} }
RecordNoStoreHeaderHistogram(request_->load_flags, new_response); RecordNoStoreHeaderHistogram(request_->load_flags, new_response_);
if (new_response_->headers->response_code() == 416 && if (new_response_->headers->response_code() == 416 &&
(method_ == "GET" || method_ == "POST")) { (method_ == "GET" || method_ == "POST")) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment