| Index: net/url_request/url_request_ftp_job.cc
|
| diff --git a/net/url_request/url_request_ftp_job.cc b/net/url_request/url_request_ftp_job.cc
|
| index 939a226751ed652760e7e546777a76a95e7cfe75..c5eaf17e8952c8e2886415e4d3226a83e3d2cd40 100644
|
| --- a/net/url_request/url_request_ftp_job.cc
|
| +++ b/net/url_request/url_request_ftp_job.cc
|
| @@ -61,8 +61,8 @@ bool URLRequestFtpJob::GetMimeType(std::string* mime_type) const {
|
| } else {
|
| // No special handling of MIME type is needed. As opposed to direct FTP
|
| // transaction, we do not get a raw directory listing to parse.
|
| - return http_transaction_->GetResponseInfo()->
|
| - headers->GetMimeType(mime_type);
|
| + return http_transaction_->GetResponseInfo()->headers->GetMimeType(
|
| + mime_type);
|
| }
|
| return false;
|
| }
|
| @@ -132,10 +132,9 @@ void URLRequestFtpJob::OnResolveProxyComplete(int result) {
|
| }
|
|
|
| // Remove unsupported proxies from the list.
|
| - proxy_info_.RemoveProxiesWithoutScheme(
|
| - ProxyServer::SCHEME_DIRECT |
|
| - ProxyServer::SCHEME_HTTP |
|
| - ProxyServer::SCHEME_HTTPS);
|
| + proxy_info_.RemoveProxiesWithoutScheme(ProxyServer::SCHEME_DIRECT |
|
| + ProxyServer::SCHEME_HTTP |
|
| + ProxyServer::SCHEME_HTTPS);
|
|
|
| // TODO(phajdan.jr): Implement proxy fallback, http://crbug.com/171495 .
|
| if (proxy_info_.is_direct())
|
| @@ -160,8 +159,7 @@ void URLRequestFtpJob::StartFtpTransaction() {
|
| if (ftp_transaction_) {
|
| rv = ftp_transaction_->Start(
|
| &ftp_request_info_,
|
| - base::Bind(&URLRequestFtpJob::OnStartCompleted,
|
| - base::Unretained(this)),
|
| + base::Bind(&URLRequestFtpJob::OnStartCompleted, base::Unretained(this)),
|
| request_->net_log());
|
| if (rv == ERR_IO_PENDING)
|
| return;
|
| @@ -178,10 +176,8 @@ void URLRequestFtpJob::StartHttpTransaction() {
|
| DCHECK(!http_transaction_);
|
|
|
| // Do not cache FTP responses sent through HTTP proxy.
|
| - request_->SetLoadFlags(request_->load_flags() |
|
| - LOAD_DISABLE_CACHE |
|
| - LOAD_DO_NOT_SAVE_COOKIES |
|
| - LOAD_DO_NOT_SEND_COOKIES);
|
| + request_->SetLoadFlags(request_->load_flags() | LOAD_DISABLE_CACHE |
|
| + LOAD_DO_NOT_SAVE_COOKIES | LOAD_DO_NOT_SEND_COOKIES);
|
|
|
| http_request_info_.url = request_->url();
|
| http_request_info_.method = request_->method();
|
| @@ -192,8 +188,7 @@ void URLRequestFtpJob::StartHttpTransaction() {
|
| if (rv == OK) {
|
| rv = http_transaction_->Start(
|
| &http_request_info_,
|
| - base::Bind(&URLRequestFtpJob::OnStartCompleted,
|
| - base::Unretained(this)),
|
| + base::Bind(&URLRequestFtpJob::OnStartCompleted, base::Unretained(this)),
|
| request_->net_log());
|
| if (rv == ERR_IO_PENDING)
|
| return;
|
| @@ -239,7 +234,8 @@ void URLRequestFtpJob::OnStartCompletedAsync(int result) {
|
| base::MessageLoop::current()->PostTask(
|
| FROM_HERE,
|
| base::Bind(&URLRequestFtpJob::OnStartCompleted,
|
| - weak_factory_.GetWeakPtr(), result));
|
| + weak_factory_.GetWeakPtr(),
|
| + result));
|
| }
|
|
|
| void URLRequestFtpJob::OnReadCompleted(int result) {
|
| @@ -282,11 +278,11 @@ void URLRequestFtpJob::RestartTransactionWithAuth() {
|
|
|
| LoadState URLRequestFtpJob::GetLoadState() const {
|
| if (proxy_info_.is_direct()) {
|
| - return ftp_transaction_ ?
|
| - ftp_transaction_->GetLoadState() : LOAD_STATE_IDLE;
|
| + return ftp_transaction_ ? ftp_transaction_->GetLoadState()
|
| + : LOAD_STATE_IDLE;
|
| } else {
|
| - return http_transaction_ ?
|
| - http_transaction_->GetLoadState() : LOAD_STATE_IDLE;
|
| + return http_transaction_ ? http_transaction_->GetLoadState()
|
| + : LOAD_STATE_IDLE;
|
| }
|
| }
|
|
|
| @@ -320,8 +316,7 @@ void URLRequestFtpJob::SetAuth(const AuthCredentials& credentials) {
|
| auth_data_->credentials = credentials;
|
|
|
| if (ftp_transaction_) {
|
| - ftp_auth_cache_->Add(request_->url().GetOrigin(),
|
| - auth_data_->credentials);
|
| + ftp_auth_cache_->Add(request_->url().GetOrigin(), auth_data_->credentials);
|
| }
|
|
|
| RestartTransactionWithAuth();
|
| @@ -345,20 +340,22 @@ UploadProgress URLRequestFtpJob::GetUploadProgress() const {
|
|
|
| bool URLRequestFtpJob::ReadRawData(IOBuffer* buf,
|
| int buf_size,
|
| - int *bytes_read) {
|
| + int* bytes_read) {
|
| DCHECK_NE(buf_size, 0);
|
| DCHECK(bytes_read);
|
| DCHECK(!read_in_progress_);
|
|
|
| int rv;
|
| if (proxy_info_.is_direct()) {
|
| - rv = ftp_transaction_->Read(buf, buf_size,
|
| - base::Bind(&URLRequestFtpJob::OnReadCompleted,
|
| - base::Unretained(this)));
|
| + rv = ftp_transaction_->Read(
|
| + buf,
|
| + buf_size,
|
| + base::Bind(&URLRequestFtpJob::OnReadCompleted, base::Unretained(this)));
|
| } else {
|
| - rv = http_transaction_->Read(buf, buf_size,
|
| - base::Bind(&URLRequestFtpJob::OnReadCompleted,
|
| - base::Unretained(this)));
|
| + rv = http_transaction_->Read(
|
| + buf,
|
| + buf_size,
|
| + base::Bind(&URLRequestFtpJob::OnReadCompleted, base::Unretained(this)));
|
| }
|
|
|
| if (rv >= 0) {
|
|
|