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

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

Issue 2365263004: Make (almost) all SpdySessions secure in unittests. (Closed)
Patch Set: Created 4 years, 2 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/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/spdy_test_util_common.h" 5 #include "net/spdy/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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 } // namespace 550 } // namespace
551 551
552 base::WeakPtr<SpdySession> CreateInsecureSpdySession( 552 base::WeakPtr<SpdySession> CreateInsecureSpdySession(
553 HttpNetworkSession* http_session, 553 HttpNetworkSession* http_session,
554 const SpdySessionKey& key, 554 const SpdySessionKey& key,
555 const NetLogWithSource& net_log) { 555 const NetLogWithSource& net_log) {
556 return CreateSpdySessionHelper(http_session, key, net_log, 556 return CreateSpdySessionHelper(http_session, key, net_log,
557 OK, false /* is_secure */); 557 OK, false /* is_secure */);
558 } 558 }
559 559
560 base::WeakPtr<SpdySession> TryCreateInsecureSpdySessionExpectingFailure( 560 base::WeakPtr<SpdySession> TryCreateSpdySessionExpectingFailure(
561 HttpNetworkSession* http_session, 561 HttpNetworkSession* http_session,
562 const SpdySessionKey& key, 562 const SpdySessionKey& key,
563 Error expected_error, 563 Error expected_error,
564 const NetLogWithSource& net_log) { 564 const NetLogWithSource& net_log) {
565 DCHECK_LT(expected_error, ERR_IO_PENDING); 565 DCHECK_LT(expected_error, ERR_IO_PENDING);
566 return CreateSpdySessionHelper(http_session, key, net_log, 566 return CreateSpdySessionHelper(http_session, key, net_log, expected_error,
567 expected_error, false /* is_secure */); 567 true /* is_secure */);
568 } 568 }
569 569
570 base::WeakPtr<SpdySession> CreateSecureSpdySession( 570 base::WeakPtr<SpdySession> CreateSecureSpdySession(
571 HttpNetworkSession* http_session, 571 HttpNetworkSession* http_session,
572 const SpdySessionKey& key, 572 const SpdySessionKey& key,
573 const NetLogWithSource& net_log) { 573 const NetLogWithSource& net_log) {
574 return CreateSpdySessionHelper(http_session, key, net_log, 574 return CreateSpdySessionHelper(http_session, key, net_log,
575 OK, true /* is_secure */); 575 OK, true /* is_secure */);
576 } 576 }
577 577
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 headers[GetSchemeKey()] = scheme.c_str(); 1139 headers[GetSchemeKey()] = scheme.c_str();
1140 headers[GetPathKey()] = path.c_str(); 1140 headers[GetPathKey()] = path.c_str();
1141 if (content_length) { 1141 if (content_length) {
1142 std::string length_str = base::Int64ToString(*content_length); 1142 std::string length_str = base::Int64ToString(*content_length);
1143 headers["content-length"] = length_str; 1143 headers["content-length"] = length_str;
1144 } 1144 }
1145 return headers; 1145 return headers;
1146 } 1146 }
1147 1147
1148 } // namespace net 1148 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_util_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698