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

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

Issue 298683010: QUIC - Persist 1000 MRU alternate protocols to preferences file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed rch's comments 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 | 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_stream_factory_impl.h" 5 #include "net/http/http_stream_factory_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 original_url.EffectiveIntPort()); 200 original_url.EffectiveIntPort());
201 201
202 HttpServerProperties& http_server_properties = 202 HttpServerProperties& http_server_properties =
203 *session_->http_server_properties(); 203 *session_->http_server_properties();
204 if (!http_server_properties.HasAlternateProtocol(origin)) 204 if (!http_server_properties.HasAlternateProtocol(origin))
205 return kNoAlternateProtocol; 205 return kNoAlternateProtocol;
206 206
207 PortAlternateProtocolPair alternate = 207 PortAlternateProtocolPair alternate =
208 http_server_properties.GetAlternateProtocol(origin); 208 http_server_properties.GetAlternateProtocol(origin);
209 if (alternate.protocol == ALTERNATE_PROTOCOL_BROKEN) { 209 if (alternate.protocol == ALTERNATE_PROTOCOL_BROKEN) {
210 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_BROKEN); 210 HistogramAlternateProtocolUsage(
211 ALTERNATE_PROTOCOL_USAGE_BROKEN,
212 http_server_properties.GetAlternateProtocolExperiment());
211 return kNoAlternateProtocol; 213 return kNoAlternateProtocol;
212 } 214 }
213 215
214 if (!IsAlternateProtocolValid(alternate.protocol)) { 216 if (!IsAlternateProtocolValid(alternate.protocol)) {
215 NOTREACHED(); 217 NOTREACHED();
216 return kNoAlternateProtocol; 218 return kNoAlternateProtocol;
217 } 219 }
218 220
219 // Some shared unix systems may have user home directories (like 221 // Some shared unix systems may have user home directories (like
220 // http://foo.com/~mike) which allow users to emit headers. This is a bad 222 // http://foo.com/~mike) which allow users to emit headers. This is a bad
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 it != requests_to_fail.end(); ++it) { 351 it != requests_to_fail.end(); ++it) {
350 Request* request = *it; 352 Request* request = *it;
351 if (request == request_map_[job]) { 353 if (request == request_map_[job]) {
352 continue; 354 continue;
353 } 355 }
354 request->OnStreamFailed(NULL, status, used_ssl_config); 356 request->OnStreamFailed(NULL, status, used_ssl_config);
355 } 357 }
356 } 358 }
357 359
358 } // namespace net 360 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties_impl_unittest.cc ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698