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 #ifndef NET_QUIC_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_ | 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_ |
6 #define NET_QUIC_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_ | 6 #define NET_QUIC_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 std::string config() const { return config_; } | 53 std::string config() const { return config_; } |
54 | 54 |
55 void set_config(base::StringPiece config) { config.CopyToString(&config_); } | 55 void set_config(base::StringPiece config) { config.CopyToString(&config_); } |
56 | 56 |
57 QuicServerConfigProtobuf::PrivateKey* add_key() { | 57 QuicServerConfigProtobuf::PrivateKey* add_key() { |
58 keys_.push_back(new PrivateKey); | 58 keys_.push_back(new PrivateKey); |
59 return keys_.back(); | 59 return keys_.back(); |
60 } | 60 } |
61 | 61 |
62 void clear_key() { STLDeleteElements(&keys_); } | 62 void clear_key() { base::STLDeleteElements(&keys_); } |
63 | 63 |
64 bool has_primary_time() const { return primary_time_ > 0; } | 64 bool has_primary_time() const { return primary_time_ > 0; } |
65 | 65 |
66 int64_t primary_time() const { return primary_time_; } | 66 int64_t primary_time() const { return primary_time_; } |
67 | 67 |
68 void set_primary_time(int64_t primary_time) { primary_time_ = primary_time; } | 68 void set_primary_time(int64_t primary_time) { primary_time_ = primary_time; } |
69 | 69 |
70 bool has_priority() const { return priority_ > 0; } | 70 bool has_priority() const { return priority_ > 0; } |
71 | 71 |
72 uint64_t priority() const { return priority_; } | 72 uint64_t priority() const { return priority_; } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // tokens when talking to clients that select this server config. | 106 // tokens when talking to clients that select this server config. |
107 // It can be of any length as it is fed into a KDF before use. | 107 // It can be of any length as it is fed into a KDF before use. |
108 std::string source_address_token_secret_override_; | 108 std::string source_address_token_secret_override_; |
109 | 109 |
110 DISALLOW_COPY_AND_ASSIGN(QuicServerConfigProtobuf); | 110 DISALLOW_COPY_AND_ASSIGN(QuicServerConfigProtobuf); |
111 }; | 111 }; |
112 | 112 |
113 } // namespace net | 113 } // namespace net |
114 | 114 |
115 #endif // NET_QUIC_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_ | 115 #endif // NET_QUIC_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_ |
OLD | NEW |