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

Unified Diff: net/quic/crypto/crypto_server_config_protobuf.h

Issue 113883003: - Add a priority field to QuicCryptoServerConfig configs and used it as (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/crypto/crypto_server_config_protobuf.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/crypto_server_config_protobuf.h
diff --git a/net/quic/crypto/crypto_server_config_protobuf.h b/net/quic/crypto/crypto_server_config_protobuf.h
index 6340ae023c49262af3687f21c89d76a11b035212..e76ff1452b445c7d7b899dc59979caa744896891 100644
--- a/net/quic/crypto/crypto_server_config_protobuf.h
+++ b/net/quic/crypto/crypto_server_config_protobuf.h
@@ -85,6 +85,18 @@ class NET_EXPORT_PRIVATE QuicServerConfigProtobuf {
primary_time_ = primary_time;
}
+ bool has_priority() const {
+ return priority_ > 0;
+ }
+
+ int64 priority() const {
+ return priority_;
+ }
+
+ void set_priority(int64 priority) {
+ priority_ = priority;
+ }
+
private:
std::vector<PrivateKey*> keys_;
@@ -94,6 +106,11 @@ class NET_EXPORT_PRIVATE QuicServerConfigProtobuf {
// primary_time_ contains a UNIX epoch seconds value that indicates when this
// config should become primary.
int64 primary_time_;
+
+ // Relative priority of this config vs other configs with the same
+ // primary time. For use as a secondary sort key when selecting the
+ // primary config.
+ uint64 priority_;
};
} // namespace net
« no previous file with comments | « no previous file | net/quic/crypto/crypto_server_config_protobuf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698