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_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_NETLOG_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 "googleurl/src/gurl.h" | 12 #include "googleurl/src/gurl.h" |
13 #include "net/base/net_log.h" | 13 #include "net/base/net_log.h" |
14 #include "net/base/request_priority.h" | 14 #include "net/base/request_priority.h" |
15 | 15 |
16 // Holds the parameters to emit to the NetLog when starting a URLRequest. | 16 // Holds the parameters to emit to the NetLog when starting a net::URLRequest. |
17 class URLRequestStartEventParameters : public net::NetLog::EventParameters { | 17 class URLRequestStartEventParameters : public net::NetLog::EventParameters { |
18 public: | 18 public: |
19 URLRequestStartEventParameters(const GURL& url, | 19 URLRequestStartEventParameters(const GURL& url, |
20 const std::string& method, | 20 const std::string& method, |
21 int load_flags, | 21 int load_flags, |
22 net::RequestPriority priority); | 22 net::RequestPriority priority); |
23 | 23 |
24 const GURL& url() const { | 24 const GURL& url() const { |
25 return url_; | 25 return url_; |
26 } | 26 } |
27 | 27 |
28 int load_flags() const { | 28 int load_flags() const { |
29 return load_flags_; | 29 return load_flags_; |
30 } | 30 } |
31 | 31 |
32 virtual Value* ToValue() const; | 32 virtual Value* ToValue() const; |
33 | 33 |
34 private: | 34 private: |
35 const GURL url_; | 35 const GURL url_; |
36 const std::string method_; | 36 const std::string method_; |
37 const int load_flags_; | 37 const int load_flags_; |
38 const net::RequestPriority priority_; | 38 const net::RequestPriority priority_; |
39 | 39 |
40 DISALLOW_COPY_AND_ASSIGN(URLRequestStartEventParameters); | 40 DISALLOW_COPY_AND_ASSIGN(URLRequestStartEventParameters); |
41 }; | 41 }; |
42 | 42 |
43 #endif // NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ | 43 #endif // NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ |
OLD | NEW |