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

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

Issue 279633003: Use non-static set_key interface on DataReductionProxySettings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 7 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_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 918
919 int HttpNetworkTransaction::DoBuildRequestComplete(int result) { 919 int HttpNetworkTransaction::DoBuildRequestComplete(int result) {
920 if (result == OK) 920 if (result == OK)
921 next_state_ = STATE_SEND_REQUEST; 921 next_state_ = STATE_SEND_REQUEST;
922 return result; 922 return result;
923 } 923 }
924 924
925 int HttpNetworkTransaction::DoSendRequest() { 925 int HttpNetworkTransaction::DoSendRequest() {
926 send_start_time_ = base::TimeTicks::Now(); 926 send_start_time_ = base::TimeTicks::Now();
927 next_state_ = STATE_SEND_REQUEST_COMPLETE; 927 next_state_ = STATE_SEND_REQUEST_COMPLETE;
928 LOG(WARNING) << "--- REQUEST -----------------------------------------";
929 LOG(WARNING) << "Sending request for " << request_->url.spec();
930 LOG(WARNING) << request_headers_.ToString();
928 931
929 return stream_->SendRequest(request_headers_, &response_, io_callback_); 932 return stream_->SendRequest(request_headers_, &response_, io_callback_);
930 } 933 }
931 934
932 int HttpNetworkTransaction::DoSendRequestComplete(int result) { 935 int HttpNetworkTransaction::DoSendRequestComplete(int result) {
933 send_end_time_ = base::TimeTicks::Now(); 936 send_end_time_ = base::TimeTicks::Now();
934 if (result < 0) 937 if (result < 0)
935 return HandleIOError(result); 938 return HandleIOError(result);
936 response_.network_accessed = true; 939 response_.network_accessed = true;
937 next_state_ = STATE_READ_HEADERS; 940 next_state_ = STATE_READ_HEADERS;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 // TODO(davidben): Consider moving this to HttpBasicStream, It's a little 985 // TODO(davidben): Consider moving this to HttpBasicStream, It's a little
983 // bizarre for SPDY. Assuming this logic is useful at all. 986 // bizarre for SPDY. Assuming this logic is useful at all.
984 // TODO(davidben): Bubble the error code up so we do not cache? 987 // TODO(davidben): Bubble the error code up so we do not cache?
985 if (result == ERR_CONNECTION_CLOSED && response_.headers.get()) 988 if (result == ERR_CONNECTION_CLOSED && response_.headers.get())
986 result = OK; 989 result = OK;
987 990
988 if (result < 0) 991 if (result < 0)
989 return HandleIOError(result); 992 return HandleIOError(result);
990 993
991 DCHECK(response_.headers.get()); 994 DCHECK(response_.headers.get());
995 std::string normalized_headers;
996 response_.headers->GetNormalizedHeaders(&normalized_headers);
997 LOG(WARNING) << "--- RESPONSE ----------------------------------------";
998 LOG(WARNING) << normalized_headers;
992 999
993 #if defined(SPDY_PROXY_AUTH_ORIGIN) 1000 #if defined(SPDY_PROXY_AUTH_ORIGIN)
994 // Server-induced fallback; see: http://crbug.com/143712 1001 // Server-induced fallback; see: http://crbug.com/143712
995 if (response_.was_fetched_via_proxy) { 1002 if (response_.was_fetched_via_proxy) {
996 ProxyService::DataReductionProxyBypassEventType proxy_bypass_event = 1003 ProxyService::DataReductionProxyBypassEventType proxy_bypass_event =
997 ProxyService::BYPASS_EVENT_TYPE_MAX; 1004 ProxyService::BYPASS_EVENT_TYPE_MAX;
998 bool data_reduction_proxy_used = 1005 bool data_reduction_proxy_used =
999 proxy_info_.proxy_server().isDataReductionProxy(); 1006 proxy_info_.proxy_server().isDataReductionProxy();
1000 bool data_reduction_fallback_proxy_used = false; 1007 bool data_reduction_fallback_proxy_used = false;
1001 #if defined(DATA_REDUCTION_FALLBACK_HOST) 1008 #if defined(DATA_REDUCTION_FALLBACK_HOST)
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 description = base::StringPrintf("Unknown state 0x%08X (%u)", state, 1618 description = base::StringPrintf("Unknown state 0x%08X (%u)", state,
1612 state); 1619 state);
1613 break; 1620 break;
1614 } 1621 }
1615 return description; 1622 return description;
1616 } 1623 }
1617 1624
1618 #undef STATE_CASE 1625 #undef STATE_CASE
1619 1626
1620 } // namespace net 1627 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698