[email protected] | a981330 | 2012-04-28 09:29:28 | [diff] [blame^] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 261283423 | 2010-05-14 21:52:36 | [diff] [blame] | 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_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ | ||||
6 | #define NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ | ||||
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 7 | #pragma once |
[email protected] | 261283423 | 2010-05-14 21:52:36 | [diff] [blame] | 8 | |
9 | #include <string> | ||||
10 | |||||
[email protected] | 0c95205 | 2010-07-13 18:01:50 | [diff] [blame] | 11 | #include "base/basictypes.h" |
[email protected] | 261283423 | 2010-05-14 21:52:36 | [diff] [blame] | 12 | #include "googleurl/src/gurl.h" |
[email protected] | 172da1b | 2011-08-12 15:52:26 | [diff] [blame] | 13 | #include "net/base/net_export.h" |
[email protected] | 261283423 | 2010-05-14 21:52:36 | [diff] [blame] | 14 | #include "net/base/net_log.h" |
[email protected] | 0c95205 | 2010-07-13 18:01:50 | [diff] [blame] | 15 | #include "net/base/request_priority.h" |
[email protected] | 261283423 | 2010-05-14 21:52:36 | [diff] [blame] | 16 | |
[email protected] | 4cc647d | 2010-12-17 22:46:41 | [diff] [blame] | 17 | namespace net { |
18 | |||||
19 | // Holds the parameters to emit to the NetLog when starting a URLRequest. | ||||
[email protected] | 172da1b | 2011-08-12 15:52:26 | [diff] [blame] | 20 | class NET_EXPORT URLRequestStartEventParameters |
21 | : public NetLog::EventParameters { | ||||
[email protected] | 261283423 | 2010-05-14 21:52:36 | [diff] [blame] | 22 | public: |
23 | URLRequestStartEventParameters(const GURL& url, | ||||
24 | const std::string& method, | ||||
[email protected] | 0c95205 | 2010-07-13 18:01:50 | [diff] [blame] | 25 | int load_flags, |
[email protected] | 4cc647d | 2010-12-17 22:46:41 | [diff] [blame] | 26 | RequestPriority priority); |
[email protected] | 261283423 | 2010-05-14 21:52:36 | [diff] [blame] | 27 | |
28 | const GURL& url() const { | ||||
29 | return url_; | ||||
30 | } | ||||
31 | |||||
[email protected] | e25e955 | 2010-07-16 08:25:41 | [diff] [blame] | 32 | int load_flags() const { |
33 | return load_flags_; | ||||
34 | } | ||||
35 | |||||
[email protected] | f2cbbc8 | 2011-11-16 01:10:29 | [diff] [blame] | 36 | virtual base::Value* ToValue() const OVERRIDE; |
[email protected] | 261283423 | 2010-05-14 21:52:36 | [diff] [blame] | 37 | |
[email protected] | a981330 | 2012-04-28 09:29:28 | [diff] [blame^] | 38 | protected: |
39 | virtual ~URLRequestStartEventParameters(); | ||||
40 | |||||
[email protected] | 261283423 | 2010-05-14 21:52:36 | [diff] [blame] | 41 | private: |
42 | const GURL url_; | ||||
43 | const std::string method_; | ||||
44 | const int load_flags_; | ||||
[email protected] | 4cc647d | 2010-12-17 22:46:41 | [diff] [blame] | 45 | const RequestPriority priority_; |
[email protected] | 0c95205 | 2010-07-13 18:01:50 | [diff] [blame] | 46 | |
47 | DISALLOW_COPY_AND_ASSIGN(URLRequestStartEventParameters); | ||||
[email protected] | 261283423 | 2010-05-14 21:52:36 | [diff] [blame] | 48 | }; |
49 | |||||
[email protected] | 4cc647d | 2010-12-17 22:46:41 | [diff] [blame] | 50 | } // namespace net |
51 | |||||
[email protected] | 261283423 | 2010-05-14 21:52:36 | [diff] [blame] | 52 | #endif // NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ |