| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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_HTTP_HTTP_NET_LOG_PARAMS_H_ | |
| 6 #define NET_HTTP_HTTP_NET_LOG_PARAMS_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/basictypes.h" | |
| 12 #include "base/memory/ref_counted.h" | |
| 13 #include "net/base/net_log.h" | |
| 14 #include "net/http/http_request_headers.h" | |
| 15 | |
| 16 namespace base { | |
| 17 class Value; | |
| 18 } | |
| 19 | |
| 20 namespace net { | |
| 21 | |
| 22 class HttpResponseHeaders; | |
| 23 | |
| 24 class NetLogHttpRequestParameter : public NetLog::EventParameters { | |
| 25 public: | |
| 26 NetLogHttpRequestParameter(const std::string& line, | |
| 27 const HttpRequestHeaders& headers); | |
| 28 | |
| 29 const HttpRequestHeaders& GetHeaders() const { | |
| 30 return headers_; | |
| 31 } | |
| 32 | |
| 33 const std::string& GetLine() const { | |
| 34 return line_; | |
| 35 } | |
| 36 | |
| 37 // NetLog::EventParameters | |
| 38 virtual base::Value* ToValue() const OVERRIDE; | |
| 39 | |
| 40 private: | |
| 41 virtual ~NetLogHttpRequestParameter(); | |
| 42 | |
| 43 const std::string line_; | |
| 44 HttpRequestHeaders headers_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(NetLogHttpRequestParameter); | |
| 47 }; | |
| 48 | |
| 49 class NetLogHttpResponseParameter : public NetLog::EventParameters { | |
| 50 public: | |
| 51 explicit NetLogHttpResponseParameter( | |
| 52 const scoped_refptr<HttpResponseHeaders>& headers); | |
| 53 | |
| 54 const HttpResponseHeaders& GetHeaders() const { | |
| 55 return *headers_; | |
| 56 } | |
| 57 | |
| 58 // NetLog::EventParameters | |
| 59 virtual base::Value* ToValue() const OVERRIDE; | |
| 60 | |
| 61 private: | |
| 62 virtual ~NetLogHttpResponseParameter(); | |
| 63 | |
| 64 const scoped_refptr<HttpResponseHeaders> headers_; | |
| 65 | |
| 66 DISALLOW_COPY_AND_ASSIGN(NetLogHttpResponseParameter); | |
| 67 }; | |
| 68 | |
| 69 } // namespace net | |
| 70 | |
| 71 #endif // NET_HTTP_HTTP_NET_LOG_PARAMS_H_ | |
| OLD | NEW |