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

Unified Diff: net/spdy/spdy_protocol.h

Issue 1171183002: Use struct AlternativeService in OnAltSvc() and OnSpdyAltSvc() methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_protocol.h
diff --git a/net/spdy/spdy_protocol.h b/net/spdy/spdy_protocol.h
index 03010677a2893089fb71e9f5617abedb141fe51c..809acd6a8ad8ac8403fd9e529c13b6f3e83f0009 100644
--- a/net/spdy/spdy_protocol.h
+++ b/net/spdy/spdy_protocol.h
@@ -23,6 +23,7 @@
#include "base/strings/string_piece.h"
#include "base/sys_byteorder.h"
#include "net/base/net_export.h"
+#include "net/spdy/spdy_alt_svc_wire_format.h"
#include "net/spdy/spdy_bitmasks.h"
namespace net {
@@ -969,30 +970,30 @@ class NET_EXPORT_PRIVATE SpdyAltSvcIR : public SpdyFrameWithStreamIdIR {
public:
explicit SpdyAltSvcIR(SpdyStreamId stream_id);
- uint32 max_age() const { return max_age_; }
- uint16 port() const { return port_; }
- SpdyProtocolId protocol_id() const {
- return protocol_id_;
- }
- std::string host() const { return host_; }
std::string origin() const { return origin_; }
+ const SpdyAltSvcWireFormat::AlternativeService& altsvc() const {
+ return altsvc_;
+ }
+ SpdyProtocolId protocol_id() const { return altsvc_.protocol_id; }
+ std::string host() const { return altsvc_.host; }
+ uint16 port() const { return altsvc_.port; }
+ uint32 max_age() const { return altsvc_.max_age; }
+ double p() const { return altsvc_.p; }
- void set_max_age(uint32 max_age) { max_age_ = max_age; }
- void set_port(uint16 port) { port_ = port; }
+ void set_origin(std::string origin) { origin_ = origin; }
void set_protocol_id(SpdyProtocolId protocol_id) {
- protocol_id_ = protocol_id;
+ altsvc_.protocol_id = protocol_id;
}
- void set_host(std::string host) { host_ = host; }
- void set_origin(std::string origin) { origin_ = origin; }
+ void set_host(std::string host) { altsvc_.host = host; }
+ void set_port(uint16 port) { altsvc_.port = port; }
+ void set_max_age(uint32 max_age) { altsvc_.max_age = max_age; }
+ void set_p(double p) { altsvc_.p = p; }
void Visit(SpdyFrameVisitor* visitor) const override;
private:
- uint32 max_age_;
- uint16 port_;
- SpdyProtocolId protocol_id_;
- std::string host_;
std::string origin_;
+ SpdyAltSvcWireFormat::AlternativeService altsvc_;
DISALLOW_COPY_AND_ASSIGN(SpdyAltSvcIR);
};
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698