OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_HTTP_HTTP_NET_LOG_PARAMS_H_ | 5 #ifndef NET_HTTP_HTTP_NET_LOG_PARAMS_H_ |
6 #define NET_HTTP_HTTP_NET_LOG_PARAMS_H_ | 6 #define NET_HTTP_HTTP_NET_LOG_PARAMS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
13 #include "net/base/net_log.h" | 13 #include "net/base/net_log.h" |
14 #include "net/http/http_request_headers.h" | 14 #include "net/http/http_request_headers.h" |
15 | 15 |
16 class Value; | 16 class Value; |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 | 19 |
20 class HttpResponseHeaders; | 20 class HttpResponseHeaders; |
21 | 21 |
22 class NetLogHttpRequestParameter : public NetLog::EventParameters { | 22 class NetLogHttpRequestParameter : public NetLog::EventParameters { |
23 public: | 23 public: |
24 NetLogHttpRequestParameter(const std::string& line, | 24 NetLogHttpRequestParameter(const std::string& line, |
25 const HttpRequestHeaders& headers); | 25 const HttpRequestHeaders& headers); |
26 | 26 |
27 Value* ToValue() const; | 27 virtual Value* ToValue() const; |
28 | 28 |
29 const HttpRequestHeaders& GetHeaders() const { | 29 const HttpRequestHeaders& GetHeaders() const { |
30 return headers_; | 30 return headers_; |
31 } | 31 } |
32 | 32 |
33 const std::string& GetLine() const { | 33 const std::string& GetLine() const { |
34 return line_; | 34 return line_; |
35 } | 35 } |
36 | 36 |
37 private: | 37 private: |
38 virtual ~NetLogHttpRequestParameter(); | 38 virtual ~NetLogHttpRequestParameter(); |
39 | 39 |
40 const std::string line_; | 40 const std::string line_; |
41 HttpRequestHeaders headers_; | 41 HttpRequestHeaders headers_; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(NetLogHttpRequestParameter); | 43 DISALLOW_COPY_AND_ASSIGN(NetLogHttpRequestParameter); |
44 }; | 44 }; |
45 | 45 |
46 class NetLogHttpResponseParameter : public NetLog::EventParameters { | 46 class NetLogHttpResponseParameter : public NetLog::EventParameters { |
47 public: | 47 public: |
48 explicit NetLogHttpResponseParameter( | 48 explicit NetLogHttpResponseParameter( |
49 const scoped_refptr<HttpResponseHeaders>& headers); | 49 const scoped_refptr<HttpResponseHeaders>& headers); |
50 | 50 |
51 Value* ToValue() const; | 51 virtual Value* ToValue() const; |
52 | 52 |
53 const HttpResponseHeaders& GetHeaders() const { | 53 const HttpResponseHeaders& GetHeaders() const { |
54 return *headers_; | 54 return *headers_; |
55 } | 55 } |
56 | 56 |
57 private: | 57 private: |
58 virtual ~NetLogHttpResponseParameter(); | 58 virtual ~NetLogHttpResponseParameter(); |
59 | 59 |
60 const scoped_refptr<HttpResponseHeaders> headers_; | 60 const scoped_refptr<HttpResponseHeaders> headers_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(NetLogHttpResponseParameter); | 62 DISALLOW_COPY_AND_ASSIGN(NetLogHttpResponseParameter); |
63 }; | 63 }; |
64 | 64 |
65 } // namespace net | 65 } // namespace net |
66 | 66 |
67 #endif // NET_HTTP_HTTP_NET_LOG_PARAMS_H_ | 67 #endif // NET_HTTP_HTTP_NET_LOG_PARAMS_H_ |
68 | 68 |
OLD | NEW |