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

Side by Side Diff: net/quic/core/crypto/crypto_server_test.cc

Issue 2417023003: Remove stl_util's deletion functions from: (Closed)
Patch Set: internal snapshot 10 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 | « no previous file | net/quic/core/crypto/quic_crypto_client_config.h » ('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) 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 <algorithm> 5 #include <algorithm>
6 #include <cstdint> 6 #include <cstdint>
7 #include <memory> 7 #include <memory>
8 #include <ostream> 8 #include <ostream>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 void SetUp() override { 129 void SetUp() override {
130 QuicCryptoServerConfig::ConfigOptions old_config_options; 130 QuicCryptoServerConfig::ConfigOptions old_config_options;
131 old_config_options.id = kOldConfigId; 131 old_config_options.id = kOldConfigId;
132 delete config_.AddDefaultConfig(rand_, &clock_, old_config_options); 132 delete config_.AddDefaultConfig(rand_, &clock_, old_config_options);
133 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1000)); 133 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(1000));
134 std::unique_ptr<QuicServerConfigProtobuf> primary_config( 134 std::unique_ptr<QuicServerConfigProtobuf> primary_config(
135 config_.GenerateConfig(rand_, &clock_, config_options_)); 135 config_.GenerateConfig(rand_, &clock_, config_options_));
136 primary_config->set_primary_time(clock_.WallNow().ToUNIXSeconds()); 136 primary_config->set_primary_time(clock_.WallNow().ToUNIXSeconds());
137 std::unique_ptr<CryptoHandshakeMessage> msg( 137 std::unique_ptr<CryptoHandshakeMessage> msg(
138 config_.AddConfig(primary_config.get(), clock_.WallNow())); 138 config_.AddConfig(std::move(primary_config), clock_.WallNow()));
139 139
140 StringPiece orbit; 140 StringPiece orbit;
141 CHECK(msg->GetStringPiece(kORBT, &orbit)); 141 CHECK(msg->GetStringPiece(kORBT, &orbit));
142 CHECK_EQ(sizeof(orbit_), orbit.size()); 142 CHECK_EQ(sizeof(orbit_), orbit.size());
143 memcpy(orbit_, orbit.data(), orbit.size()); 143 memcpy(orbit_, orbit.data(), orbit.size());
144 144
145 char public_value[32]; 145 char public_value[32];
146 memset(public_value, 42, sizeof(public_value)); 146 memset(public_value, 42, sizeof(public_value));
147 147
148 nonce_hex_ = "#" + QuicUtils::HexEncode(GenerateNonce()); 148 nonce_hex_ = "#" + QuicUtils::HexEncode(GenerateNonce());
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); 1279 EXPECT_EQ(0, strike_register_client_->PendingVerifications());
1280 } else { 1280 } else {
1281 // version 33. 1281 // version 33.
1282 ASSERT_EQ(kSHLO, out_.tag()); 1282 ASSERT_EQ(kSHLO, out_.tag());
1283 CheckServerHello(out_); 1283 CheckServerHello(out_);
1284 } 1284 }
1285 } 1285 }
1286 1286
1287 } // namespace test 1287 } // namespace test
1288 } // namespace net 1288 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/core/crypto/quic_crypto_client_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698