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

Side by Side Diff: net/http/http_net_log_params.h

Issue 10399083: Make NetLog take in callbacks that return Values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix merge error Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/net_log_unittest.cc ('k') | net/http/http_net_log_params.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« no previous file with comments | « net/base/net_log_unittest.cc ('k') | net/http/http_net_log_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698