OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/crypto/quic_server_info.h" | 5 #include "net/quic/crypto/quic_server_info.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/pickle.h" | 9 #include "base/pickle.h" |
10 | 10 |
11 using std::string; | 11 using std::string; |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 const int kQuicCryptoConfigVersion = 1; | 15 const int kQuicCryptoConfigVersion = 1; |
16 | 16 |
17 } // namespace | 17 } // namespace |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 | 20 |
21 QuicServerInfo::State::State() {} | 21 QuicServerInfo::State::State() { |
| 22 } |
22 | 23 |
23 QuicServerInfo::State::~State() {} | 24 QuicServerInfo::State::~State() { |
| 25 } |
24 | 26 |
25 void QuicServerInfo::State::Clear() { | 27 void QuicServerInfo::State::Clear() { |
26 server_config.clear(); | 28 server_config.clear(); |
27 source_address_token.clear(); | 29 source_address_token.clear(); |
28 server_config_sig.clear(); | 30 server_config_sig.clear(); |
29 certs.clear(); | 31 certs.clear(); |
30 } | 32 } |
31 | 33 |
32 QuicServerInfo::QuicServerInfo(const QuicServerId& server_id) | 34 QuicServerInfo::QuicServerInfo(const QuicServerId& server_id) |
33 : server_id_(server_id) { | 35 : server_id_(server_id) { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 !p.WriteUInt32(state_.certs.size())) { | 128 !p.WriteUInt32(state_.certs.size())) { |
127 return string(); | 129 return string(); |
128 } | 130 } |
129 | 131 |
130 for (size_t i = 0; i < state_.certs.size(); i++) { | 132 for (size_t i = 0; i < state_.certs.size(); i++) { |
131 if (!p.WriteString(state_.certs[i])) { | 133 if (!p.WriteString(state_.certs[i])) { |
132 return string(); | 134 return string(); |
133 } | 135 } |
134 } | 136 } |
135 | 137 |
136 return string(reinterpret_cast<const char *>(p.data()), p.size()); | 138 return string(reinterpret_cast<const char*>(p.data()), p.size()); |
137 } | 139 } |
138 | 140 |
139 QuicServerInfoFactory::~QuicServerInfoFactory() {} | 141 QuicServerInfoFactory::~QuicServerInfoFactory() { |
| 142 } |
140 | 143 |
141 } // namespace net | 144 } // namespace net |
OLD | NEW |