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