| OLD | NEW |
| 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/quic/crypto/crypto_server_config.h" | 5 #include "net/quic/crypto/crypto_server_config.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 | 9 |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 base::AutoLock locked(configs_lock_); | 178 base::AutoLock locked(configs_lock_); |
| 179 if (configs_.find(config->id) != configs_.end()) { | 179 if (configs_.find(config->id) != configs_.end()) { |
| 180 LOG(WARNING) << "Failed to add config because another with the same " | 180 LOG(WARNING) << "Failed to add config because another with the same " |
| 181 "server config id already exists: " | 181 "server config id already exists: " |
| 182 << base::HexEncode(config->id.data(), config->id.size()); | 182 << base::HexEncode(config->id.data(), config->id.size()); |
| 183 return NULL; | 183 return NULL; |
| 184 } | 184 } |
| 185 | 185 |
| 186 configs_[config->id] = config; | 186 configs_[config->id] = config; |
| 187 SelectNewPrimaryConfig(now); | 187 SelectNewPrimaryConfig(now); |
| 188 DCHECK(primary_config_); | 188 DCHECK(primary_config_.get()); |
| 189 } | 189 } |
| 190 | 190 |
| 191 return msg.release(); | 191 return msg.release(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 CryptoHandshakeMessage* QuicCryptoServerConfig::AddDefaultConfig( | 194 CryptoHandshakeMessage* QuicCryptoServerConfig::AddDefaultConfig( |
| 195 QuicRandom* rand, | 195 QuicRandom* rand, |
| 196 const QuicClock* clock, | 196 const QuicClock* clock, |
| 197 const ConfigOptions& options) { | 197 const ConfigOptions& options) { |
| 198 scoped_ptr<QuicServerConfigProtobuf> config( | 198 scoped_ptr<QuicServerConfigProtobuf> config( |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 QuicCryptoServerConfig::Config::Config() | 1024 QuicCryptoServerConfig::Config::Config() |
| 1025 : channel_id_enabled(false), | 1025 : channel_id_enabled(false), |
| 1026 is_primary(false), | 1026 is_primary(false), |
| 1027 primary_time(QuicWallTime::Zero()) {} | 1027 primary_time(QuicWallTime::Zero()) {} |
| 1028 | 1028 |
| 1029 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } | 1029 QuicCryptoServerConfig::Config::~Config() { STLDeleteElements(&key_exchanges); } |
| 1030 | 1030 |
| 1031 } // namespace net | 1031 } // namespace net |
| OLD | NEW |