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

Side by Side Diff: net/http/http_cache_transaction.cc

Issue 13609002: fix a problem that android cannot download files with basic authentication (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adding a call in http_transactions to get the auth info Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
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/http/http_cache_transaction.h" 5 #include "net/http/http_cache_transaction.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_POSIX) 9 #if defined(OS_POSIX)
10 #include <unistd.h> 10 #include <unistd.h>
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 return rv; 342 return rv;
343 } 343 }
344 344
345 bool HttpCache::Transaction::IsReadyToRestartForAuth() { 345 bool HttpCache::Transaction::IsReadyToRestartForAuth() {
346 if (!network_trans_.get()) 346 if (!network_trans_.get())
347 return false; 347 return false;
348 return network_trans_->IsReadyToRestartForAuth(); 348 return network_trans_->IsReadyToRestartForAuth();
349 } 349 }
350 350
351 bool HttpCache::Transaction::HasAuth() const {
352 return network_trans_.get() ? network_trans_->HasAuth() : false;
353 }
354
351 int HttpCache::Transaction::Read(IOBuffer* buf, int buf_len, 355 int HttpCache::Transaction::Read(IOBuffer* buf, int buf_len,
352 const CompletionCallback& callback) { 356 const CompletionCallback& callback) {
353 DCHECK(buf); 357 DCHECK(buf);
354 DCHECK_GT(buf_len, 0); 358 DCHECK_GT(buf_len, 0);
355 DCHECK(!callback.is_null()); 359 DCHECK(!callback.is_null());
356 360
357 DCHECK(callback_.is_null()); 361 DCHECK(callback_.is_null());
358 362
359 if (!cache_) 363 if (!cache_)
360 return ERR_UNEXPECTED; 364 return ERR_UNEXPECTED;
(...skipping 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after
2519 } 2523 }
2520 2524
2521 int HttpCache::Transaction::ResetCacheIOStart(int return_value) { 2525 int HttpCache::Transaction::ResetCacheIOStart(int return_value) {
2522 DCHECK(cache_io_start_.is_null()); 2526 DCHECK(cache_io_start_.is_null());
2523 if (return_value == ERR_IO_PENDING) 2527 if (return_value == ERR_IO_PENDING)
2524 cache_io_start_ = base::TimeTicks::Now(); 2528 cache_io_start_ = base::TimeTicks::Now();
2525 return return_value; 2529 return return_value;
2526 } 2530 }
2527 2531
2528 } // namespace net 2532 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698