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

Unified Diff: net/http/http_server_properties.h

Issue 2901093004: Add and persist a new field in AlternativeServiceInfo to list QUIC verisons advertised (Closed)
Patch Set: self review Created 3 years, 7 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 | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_server_properties.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties.h
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h
index fc19d24e18b103a384f34507ddf30a277dd5582c..14d412c7b7ad1f77c83e946f27dcee7d4be97fdb 100644
--- a/net/http/http_server_properties.h
+++ b/net/http/http_server_properties.h
@@ -20,6 +20,7 @@
#include "net/base/net_export.h"
#include "net/quic/core/quic_bandwidth.h"
#include "net/quic/core/quic_server_id.h"
+#include "net/quic/core/quic_versions.h"
#include "net/socket/next_proto.h"
#include "net/spdy/core/spdy_framer.h" // TODO(willchan): Reconsider this.
#include "net/spdy/core/spdy_protocol.h"
@@ -115,24 +116,26 @@ NET_EXPORT_PRIVATE std::ostream& operator<<(
const AlternativeService& alternative_service);
struct NET_EXPORT AlternativeServiceInfo {
- AlternativeServiceInfo() : alternative_service() {}
+ AlternativeServiceInfo();
+ ~AlternativeServiceInfo();
+ // HTTP/2 Alternative Service.
AlternativeServiceInfo(const AlternativeService& alternative_service,
- base::Time expiration)
- : alternative_service(alternative_service),
- expiration(expiration) {}
+ base::Time expiration);
Ryan Hamilton 2017/05/24 19:52:53 Does anything use this constructor? SetAlternative
Zhongyi Shi 2017/05/24 22:44:54 SetAlternativeService uses the second, SetAlternat
Ryan Hamilton 2017/05/24 23:12:12 Can SpdySession create a QUIC Alt-Svc?
- AlternativeServiceInfo(NextProto protocol,
- const std::string& host,
- uint16_t port,
- base::Time expiration)
- : alternative_service(protocol, host, port), expiration(expiration) {}
+ // QUIC Alternative Service.
Ryan Hamilton 2017/05/24 19:52:53 I'm not sure these two comments are accurate. I do
Zhongyi Shi 2017/05/24 22:44:55 Done.
+ AlternativeServiceInfo(const AlternativeService& alternative_service,
+ base::Time expiration,
+ const QuicVersionVector& advertised_versions);
AlternativeServiceInfo(
- const AlternativeServiceInfo& alternative_service_info) = default;
+ const AlternativeServiceInfo& alternative_service_info);
+
AlternativeServiceInfo& operator=(
const AlternativeServiceInfo& alternative_service_info) = default;
Ryan Hamilton 2017/05/24 19:52:53 (I'm surprised that you don't get a compiler compl
+ // TODO(zhongyi): add equality check on |advertised_versions| once it
+ // is persisted to disk.
Ryan Hamilton 2017/05/24 19:52:54 Why not do this now?
Zhongyi Shi 2017/05/24 22:44:54 Ah, apparently I forgot to give a heads-up on this
Ryan Hamilton 2017/05/24 23:12:12 Heh. OK. Any reason not to land this?
bool operator==(const AlternativeServiceInfo& other) const {
return alternative_service == other.alternative_service &&
expiration == other.expiration;
@@ -146,6 +149,7 @@ struct NET_EXPORT AlternativeServiceInfo {
AlternativeService alternative_service;
base::Time expiration;
+ QuicVersionVector advertised_versions;
};
struct NET_EXPORT SupportsQuic {
@@ -251,7 +255,8 @@ class NET_EXPORT HttpServerProperties {
virtual bool SetAlternativeService(
const url::SchemeHostPort& origin,
const AlternativeService& alternative_service,
- base::Time expiration) = 0;
+ base::Time expiration,
+ const QuicVersionVector& advertised_versions) = 0;
// Set alternative services for |origin|. Previous alternative services for
// |origin| are discarded.
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_server_properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698