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

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

Issue 1006643002: Plumb connection attempts from (non-proxy) ConnectJobs to HttpNetworkTransaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a few more tests Created 5 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
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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 DCHECK(!network_trans_); 687 DCHECK(!network_trans_);
688 before_proxy_headers_sent_callback_ = callback; 688 before_proxy_headers_sent_callback_ = callback;
689 } 689 }
690 690
691 int HttpCache::Transaction::ResumeNetworkStart() { 691 int HttpCache::Transaction::ResumeNetworkStart() {
692 if (network_trans_) 692 if (network_trans_)
693 return network_trans_->ResumeNetworkStart(); 693 return network_trans_->ResumeNetworkStart();
694 return ERR_UNEXPECTED; 694 return ERR_UNEXPECTED;
695 } 695 }
696 696
697 // TODO(ttuttle): Should the HttpCache::Transaction be accumulating these
698 // instead of just proxying to the (current?) HttpNetworkTransaction?
Randy Smith (Not in Mondays) 2015/04/23 19:04:08 Put a little bit more detail into this TODO, maybe
Deprecated (see juliatuttle) 2015/04/23 21:04:16 Better yet, I'll just do it now.
699 void HttpCache::Transaction::GetConnectionAttempts(
700 ConnectionAttempts* out) const {
701 if (network_trans_)
702 network_trans_->GetConnectionAttempts(out);
703 else
704 out->clear();
705 }
706
697 //----------------------------------------------------------------------------- 707 //-----------------------------------------------------------------------------
698 708
699 void HttpCache::Transaction::DoCallback(int rv) { 709 void HttpCache::Transaction::DoCallback(int rv) {
700 DCHECK(rv != ERR_IO_PENDING); 710 DCHECK(rv != ERR_IO_PENDING);
701 DCHECK(!callback_.is_null()); 711 DCHECK(!callback_.is_null());
702 712
703 read_buf_ = NULL; // Release the buffer before invoking the callback. 713 read_buf_ = NULL; // Release the buffer before invoking the callback.
704 714
705 // Since Run may result in Read being called, clear callback_ up front. 715 // Since Run may result in Read being called, clear callback_ up front.
706 CompletionCallback c = callback_; 716 CompletionCallback c = callback_;
(...skipping 2323 matching lines...) Expand 10 before | Expand all | Expand 10 after
3030 default: 3040 default:
3031 NOTREACHED(); 3041 NOTREACHED();
3032 } 3042 }
3033 } 3043 }
3034 3044
3035 void HttpCache::Transaction::OnIOComplete(int result) { 3045 void HttpCache::Transaction::OnIOComplete(int result) {
3036 DoLoop(result); 3046 DoLoop(result);
3037 } 3047 }
3038 3048
3039 } // namespace net 3049 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698