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

Side by Side Diff: net/quic/quic_stream_factory.cc

Issue 1009543004: Create a Perspective enum to use instead of a bool is_server to improve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NET_EXPORT_PRIVATE to fix compiler error Created 5 years, 9 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
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/quic_stream_sequencer_test.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/quic/quic_stream_factory.h" 5 #include "net/quic/quic_stream_factory.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/cpu.h" 9 #include "base/cpu.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 helper_.reset(new QuicConnectionHelper( 1072 helper_.reset(new QuicConnectionHelper(
1073 base::MessageLoop::current()->message_loop_proxy().get(), 1073 base::MessageLoop::current()->message_loop_proxy().get(),
1074 clock_.get(), random_generator_)); 1074 clock_.get(), random_generator_));
1075 } 1075 }
1076 1076
1077 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. 1077 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
1078 tracked_objects::ScopedTracker tracking_profile4( 1078 tracked_objects::ScopedTracker tracking_profile4(
1079 FROM_HERE_WITH_EXPLICIT_FUNCTION( 1079 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1080 "422516 QuicStreamFactory::CreateSession4")); 1080 "422516 QuicStreamFactory::CreateSession4"));
1081 1081
1082 QuicConnection* connection = new QuicConnection(connection_id, 1082 QuicConnection* connection = new QuicConnection(
1083 addr, 1083 connection_id, addr, helper_.get(), packet_writer_factory,
1084 helper_.get(), 1084 true /* owns_writer */, Perspective::IS_CLIENT, server_id.is_https(),
1085 packet_writer_factory, 1085 supported_versions_);
1086 true /* owns_writer */,
1087 false /* is_server */,
1088 server_id.is_https(),
1089 supported_versions_);
1090 connection->set_max_packet_length(max_packet_length_); 1086 connection->set_max_packet_length(max_packet_length_);
1091 1087
1092 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. 1088 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
1093 tracked_objects::ScopedTracker tracking_profile5( 1089 tracked_objects::ScopedTracker tracking_profile5(
1094 FROM_HERE_WITH_EXPLICIT_FUNCTION( 1090 FROM_HERE_WITH_EXPLICIT_FUNCTION(
1095 "422516 QuicStreamFactory::CreateSession5")); 1091 "422516 QuicStreamFactory::CreateSession5"));
1096 1092
1097 InitializeCachedStateInCryptoConfig(server_id, server_info); 1093 InitializeCachedStateInCryptoConfig(server_id, server_info);
1098 1094
1099 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. 1095 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP 1326 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP
1331 // job also fails. So to avoid not using QUIC when we otherwise could, we mark 1327 // job also fails. So to avoid not using QUIC when we otherwise could, we mark
1332 // it as recently broken, which means that 0-RTT will be disabled but we'll 1328 // it as recently broken, which means that 0-RTT will be disabled but we'll
1333 // still race. 1329 // still race.
1334 const HostPortPair& server = server_id.host_port_pair(); 1330 const HostPortPair& server = server_id.host_port_pair();
1335 http_server_properties_->MarkAlternativeServiceRecentlyBroken( 1331 http_server_properties_->MarkAlternativeServiceRecentlyBroken(
1336 AlternativeService(QUIC, server.host(), server.port())); 1332 AlternativeService(QUIC, server.host(), server.port()));
1337 } 1333 }
1338 1334
1339 } // namespace net 1335 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/quic_stream_sequencer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698