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

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

Issue 13190010: Switch the QUIC alternate protocol string from "quic/1" to "quic", since QUIC can do its own versio… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_stream_factory_impl_job.h" 5 #include "net/http/http_stream_factory_impl_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 default: 170 default:
171 return LOAD_STATE_IDLE; 171 return LOAD_STATE_IDLE;
172 } 172 }
173 } 173 }
174 174
175 void HttpStreamFactoryImpl::Job::MarkAsAlternate( 175 void HttpStreamFactoryImpl::Job::MarkAsAlternate(
176 const GURL& original_url, 176 const GURL& original_url,
177 PortAlternateProtocolPair alternate) { 177 PortAlternateProtocolPair alternate) {
178 DCHECK(!original_url_.get()); 178 DCHECK(!original_url_.get());
179 original_url_.reset(new GURL(original_url)); 179 original_url_.reset(new GURL(original_url));
180 if (alternate.protocol == QUIC_1) { 180 if (alternate.protocol == QUIC) {
181 DCHECK(session_->params().enable_quic); 181 DCHECK(session_->params().enable_quic);
182 using_quic_ = true; 182 using_quic_ = true;
183 } 183 }
184 } 184 }
185 185
186 void HttpStreamFactoryImpl::Job::WaitFor(Job* job) { 186 void HttpStreamFactoryImpl::Job::WaitFor(Job* job) {
187 DCHECK_EQ(STATE_NONE, next_state_); 187 DCHECK_EQ(STATE_NONE, next_state_);
188 DCHECK_EQ(STATE_NONE, job->next_state_); 188 DCHECK_EQ(STATE_NONE, job->next_state_);
189 DCHECK(!blocking_job_); 189 DCHECK(!blocking_job_);
190 DCHECK(!job->waiting_job_); 190 DCHECK(!job->waiting_job_);
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH | 1356 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH |
1357 net::LOAD_IS_DOWNLOAD)) { 1357 net::LOAD_IS_DOWNLOAD)) {
1358 // Avoid pipelining resources that may be streamed for a long time. 1358 // Avoid pipelining resources that may be streamed for a long time.
1359 return false; 1359 return false;
1360 } 1360 }
1361 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( 1361 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining(
1362 *http_pipelining_key_.get()); 1362 *http_pipelining_key_.get());
1363 } 1363 }
1364 1364
1365 } // namespace net 1365 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698