1 // Copyright 2014 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.
4 
5 #ifndef NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_RESPONSE_INFO_H_
6 #define NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_RESPONSE_INFO_H_
7 
8 #include "base/macros.h"
9 #include "base/memory/scoped_refptr.h"
10 #include "base/time/time.h"
11 #include "net/base/ip_endpoint.h"
12 #include "net/base/net_export.h"
13 #include "url/gurl.h"
14 
15 namespace net {
16 
17 class HttpResponseHeaders;
18 
19 struct NET_EXPORT WebSocketHandshakeResponseInfo {
20   WebSocketHandshakeResponseInfo(const GURL& url,
21                                  scoped_refptr<HttpResponseHeaders> headers,
22                                  const IPEndPoint& remote_endpoint,
23                                  base::Time response_time);
24   ~WebSocketHandshakeResponseInfo();
25   // The request URL
26   GURL url;
27   // HTTP response headers
28   scoped_refptr<HttpResponseHeaders> headers;
29   // Remote address of the socket.
30   IPEndPoint remote_endpoint;
31   // The time that this response arrived
32   base::Time response_time;
33 
34  private:
35   DISALLOW_COPY_AND_ASSIGN(WebSocketHandshakeResponseInfo);
36 };
37 
38 }  // namespace net
39 
40 #endif  // NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_RESPONSE_INFO_H_
41