| 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/chromium/quic_server_info.h" | 5 #include "net/quic/chromium/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 #include "base/stl_util.h" |
| 10 | 11 |
| 11 using std::string; | 12 using std::string; |
| 12 | 13 |
| 13 namespace { | 14 namespace { |
| 14 | 15 |
| 15 const int kQuicCryptoConfigVersion = 2; | 16 const int kQuicCryptoConfigVersion = 2; |
| 16 | 17 |
| 17 } // namespace | 18 } // namespace |
| 18 | 19 |
| 19 namespace net { | 20 namespace net { |
| 20 | 21 |
| 21 QuicServerInfo::State::State() {} | 22 QuicServerInfo::State::State() {} |
| 22 | 23 |
| 23 QuicServerInfo::State::~State() {} | 24 QuicServerInfo::State::~State() {} |
| 24 | 25 |
| 25 void QuicServerInfo::State::Clear() { | 26 void QuicServerInfo::State::Clear() { |
| 26 server_config.clear(); | 27 base::STLClearObject(&server_config); |
| 27 source_address_token.clear(); | 28 base::STLClearObject(&source_address_token); |
| 28 cert_sct.clear(); | 29 base::STLClearObject(&cert_sct); |
| 29 chlo_hash.clear(); | 30 base::STLClearObject(&chlo_hash); |
| 30 server_config_sig.clear(); | 31 base::STLClearObject(&server_config_sig); |
| 31 certs.clear(); | 32 base::STLClearObject(&certs); |
| 32 } | 33 } |
| 33 | 34 |
| 34 QuicServerInfo::QuicServerInfo(const QuicServerId& server_id) | 35 QuicServerInfo::QuicServerInfo(const QuicServerId& server_id) |
| 35 : server_id_(server_id) {} | 36 : server_id_(server_id) {} |
| 36 | 37 |
| 37 QuicServerInfo::~QuicServerInfo() {} | 38 QuicServerInfo::~QuicServerInfo() {} |
| 38 | 39 |
| 39 const QuicServerInfo::State& QuicServerInfo::state() const { | 40 const QuicServerInfo::State& QuicServerInfo::state() const { |
| 40 return state_; | 41 return state_; |
| 41 } | 42 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 return string(); | 142 return string(); |
| 142 } | 143 } |
| 143 } | 144 } |
| 144 | 145 |
| 145 return string(reinterpret_cast<const char*>(p.data()), p.size()); | 146 return string(reinterpret_cast<const char*>(p.data()), p.size()); |
| 146 } | 147 } |
| 147 | 148 |
| 148 QuicServerInfoFactory::~QuicServerInfoFactory() {} | 149 QuicServerInfoFactory::~QuicServerInfoFactory() {} |
| 149 | 150 |
| 150 } // namespace net | 151 } // namespace net |
| OLD | NEW |