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

Side by Side Diff: net/spdy/chromium/spdy_test_util_common.cc

Issue 2873243004: Do not mark QUIC as bad on network change events (Closed)
Patch Set: Created 3 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
« no previous file with comments | « net/spdy/chromium/spdy_test_util_common.h ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/spdy/chromium/spdy_test_util_common.h" 5 #include "net/spdy/chromium/spdy_test_util_common.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <utility> 10 #include <utility>
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 http_server_properties(new HttpServerPropertiesImpl), 342 http_server_properties(new HttpServerPropertiesImpl),
343 enable_ip_pooling(true), 343 enable_ip_pooling(true),
344 enable_ping(false), 344 enable_ping(false),
345 enable_user_alternate_protocol_ports(false), 345 enable_user_alternate_protocol_ports(false),
346 enable_quic(false), 346 enable_quic(false),
347 enable_server_push_cancellation(false), 347 enable_server_push_cancellation(false),
348 session_max_recv_window_size(kDefaultInitialWindowSize), 348 session_max_recv_window_size(kDefaultInitialWindowSize),
349 time_func(&base::TimeTicks::Now), 349 time_func(&base::TimeTicks::Now),
350 enable_http2_alternative_service(false), 350 enable_http2_alternative_service(false),
351 net_log(nullptr), 351 net_log(nullptr),
352 http_09_on_non_default_ports_enabled(false), 352 http_09_on_non_default_ports_enabled(false) {
353 quic_do_not_mark_as_broken_on_network_change(false) {
354 // Note: The CancelledTransaction test does cleanup by running all 353 // Note: The CancelledTransaction test does cleanup by running all
355 // tasks in the message loop (RunAllPending). Unfortunately, that 354 // tasks in the message loop (RunAllPending). Unfortunately, that
356 // doesn't clean up tasks on the host resolver thread; and 355 // doesn't clean up tasks on the host resolver thread; and
357 // TCPConnectJob is currently not cancellable. Using synchronous 356 // TCPConnectJob is currently not cancellable. Using synchronous
358 // lookups allows the test to shutdown cleanly. Until we have 357 // lookups allows the test to shutdown cleanly. Until we have
359 // cancellable TCPConnectJobs, use synchronous lookups. 358 // cancellable TCPConnectJobs, use synchronous lookups.
360 host_resolver->set_synchronous_mode(true); 359 host_resolver->set_synchronous_mode(true);
361 http2_settings[SETTINGS_INITIAL_WINDOW_SIZE] = kDefaultInitialWindowSize; 360 http2_settings[SETTINGS_INITIAL_WINDOW_SIZE] = kDefaultInitialWindowSize;
362 } 361 }
363 362
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 params.spdy_session_max_recv_window_size = 409 params.spdy_session_max_recv_window_size =
411 session_deps->session_max_recv_window_size; 410 session_deps->session_max_recv_window_size;
412 params.http2_settings = session_deps->http2_settings; 411 params.http2_settings = session_deps->http2_settings;
413 params.time_func = session_deps->time_func; 412 params.time_func = session_deps->time_func;
414 params.proxy_delegate = session_deps->proxy_delegate.get(); 413 params.proxy_delegate = session_deps->proxy_delegate.get();
415 params.enable_http2_alternative_service = 414 params.enable_http2_alternative_service =
416 session_deps->enable_http2_alternative_service; 415 session_deps->enable_http2_alternative_service;
417 params.net_log = session_deps->net_log; 416 params.net_log = session_deps->net_log;
418 params.http_09_on_non_default_ports_enabled = 417 params.http_09_on_non_default_ports_enabled =
419 session_deps->http_09_on_non_default_ports_enabled; 418 session_deps->http_09_on_non_default_ports_enabled;
420 params.quic_do_not_mark_as_broken_on_network_change =
421 session_deps->quic_do_not_mark_as_broken_on_network_change;
422 return params; 419 return params;
423 } 420 }
424 421
425 class AllowAnyCertCTPolicyEnforcer : public CTPolicyEnforcer { 422 class AllowAnyCertCTPolicyEnforcer : public CTPolicyEnforcer {
426 public: 423 public:
427 AllowAnyCertCTPolicyEnforcer() {} 424 AllowAnyCertCTPolicyEnforcer() {}
428 ~AllowAnyCertCTPolicyEnforcer() override = default; 425 ~AllowAnyCertCTPolicyEnforcer() override = default;
429 426
430 ct::CertPolicyCompliance DoesConformToCertPolicy( 427 ct::CertPolicyCompliance DoesConformToCertPolicy(
431 X509Certificate* cert, 428 X509Certificate* cert,
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 headers[GetSchemeKey()] = scheme.c_str(); 1155 headers[GetSchemeKey()] = scheme.c_str();
1159 headers[GetPathKey()] = path.c_str(); 1156 headers[GetPathKey()] = path.c_str();
1160 if (content_length) { 1157 if (content_length) {
1161 SpdyString length_str = base::Int64ToString(*content_length); 1158 SpdyString length_str = base::Int64ToString(*content_length);
1162 headers["content-length"] = length_str; 1159 headers["content-length"] = length_str;
1163 } 1160 }
1164 return headers; 1161 return headers;
1165 } 1162 }
1166 1163
1167 } // namespace net 1164 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/chromium/spdy_test_util_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698