Revert "Fix broken channel icon in chrome://help on CrOS" and try again
[chromium-blink-merge.git] / net / spdy / spdy_session_key.h
blob59c832bb52b4bef3ca934ca99d2fc43dc40eb582
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
3 // found in the LICENSE file.
5 #ifndef NET_SPDY_SPDY_SESSION_KEY_H_
6 #define NET_SPDY_SPDY_SESSION_KEY_H_
8 #include "net/base/privacy_mode.h"
9 #include "net/proxy/proxy_server.h"
11 namespace net {
13 // SpdySessionKey is used as unique index for SpdySessionPool.
14 class NET_EXPORT_PRIVATE SpdySessionKey {
15 public:
16 SpdySessionKey();
17 SpdySessionKey(const HostPortPair& host_port_pair,
18 const ProxyServer& proxy_server,
19 PrivacyMode privacy_mode);
21 // Temporary hack for implicit copy constructor
22 SpdySessionKey(const HostPortProxyPair& host_port_proxy_pair,
23 PrivacyMode privacy_mode);
25 ~SpdySessionKey();
27 // Comparator function so this can be placed in a std::map.
28 bool operator<(const SpdySessionKey& other) const;
30 // Equality test of contents. (Probably another violation of style guide).
31 bool Equals(const SpdySessionKey& other) const;
33 const HostPortProxyPair& host_port_proxy_pair() const {
34 return host_port_proxy_pair_;
37 const HostPortPair& host_port_pair() const {
38 return host_port_proxy_pair_.first;
41 const ProxyServer& proxy_server() const {
42 return host_port_proxy_pair_.second;
45 PrivacyMode privacy_mode() const {
46 return privacy_mode_;
49 private:
50 HostPortProxyPair host_port_proxy_pair_;
51 // If enabled, then session cannot be tracked by the server.
52 PrivacyMode privacy_mode_;
55 } // namespace net
57 #endif // NET_SPDY_SPDY_SESSION_KEY_H_