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

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

Issue 2519473002: Fixes the cache lock issue. (Closed)
Patch Set: Initial patch Created 4 years 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_ftp_job.h" 5 #include "net/url_request/url_request_ftp_job.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 } 127 }
128 128
129 void URLRequestFtpJob::Kill() { 129 void URLRequestFtpJob::Kill() {
130 if (pac_request_) { 130 if (pac_request_) {
131 proxy_service_->CancelPacRequest(pac_request_); 131 proxy_service_->CancelPacRequest(pac_request_);
132 pac_request_ = nullptr; 132 pac_request_ = nullptr;
133 } 133 }
134 if (ftp_transaction_) 134 if (ftp_transaction_)
135 ftp_transaction_.reset(); 135 ftp_transaction_.reset();
136 if (http_transaction_) 136 if (http_transaction_)
137 http_transaction_.reset(); 137 http_transaction_->Orphan(std::move(http_transaction_));
138 URLRequestJob::Kill(); 138 URLRequestJob::Kill();
139 weak_factory_.InvalidateWeakPtrs(); 139 weak_factory_.InvalidateWeakPtrs();
140 } 140 }
141 141
142 void URLRequestFtpJob::OnResolveProxyComplete(int result) { 142 void URLRequestFtpJob::OnResolveProxyComplete(int result) {
143 pac_request_ = NULL; 143 pac_request_ = NULL;
144 144
145 if (result != OK) { 145 if (result != OK) {
146 OnStartCompletedAsync(result); 146 OnStartCompletedAsync(result);
147 return; 147 return;
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 if (cached_auth) { 382 if (cached_auth) {
383 // Retry using cached auth data. 383 // Retry using cached auth data.
384 SetAuth(cached_auth->credentials); 384 SetAuth(cached_auth->credentials);
385 } else { 385 } else {
386 // Prompt for a username/password. 386 // Prompt for a username/password.
387 NotifyHeadersComplete(); 387 NotifyHeadersComplete();
388 } 388 }
389 } 389 }
390 390
391 } // namespace net 391 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698