| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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_api.h" |
| 13 #include "net/base/net_log.h" | 14 #include "net/base/net_log.h" |
| 14 #include "net/base/request_priority.h" | 15 #include "net/base/request_priority.h" |
| 15 | 16 |
| 16 namespace net { | 17 namespace net { |
| 17 | 18 |
| 18 // Holds the parameters to emit to the NetLog when starting a URLRequest. | 19 // Holds the parameters to emit to the NetLog when starting a URLRequest. |
| 19 class URLRequestStartEventParameters : public NetLog::EventParameters { | 20 class NET_API URLRequestStartEventParameters : public NetLog::EventParameters { |
| 20 public: | 21 public: |
| 21 URLRequestStartEventParameters(const GURL& url, | 22 URLRequestStartEventParameters(const GURL& url, |
| 22 const std::string& method, | 23 const std::string& method, |
| 23 int load_flags, | 24 int load_flags, |
| 24 RequestPriority priority); | 25 RequestPriority priority); |
| 25 | 26 |
| 26 const GURL& url() const { | 27 const GURL& url() const { |
| 27 return url_; | 28 return url_; |
| 28 } | 29 } |
| 29 | 30 |
| 30 int load_flags() const { | 31 int load_flags() const { |
| 31 return load_flags_; | 32 return load_flags_; |
| 32 } | 33 } |
| 33 | 34 |
| 34 virtual Value* ToValue() const; | 35 virtual Value* ToValue() const; |
| 35 | 36 |
| 36 private: | 37 private: |
| 37 const GURL url_; | 38 const GURL url_; |
| 38 const std::string method_; | 39 const std::string method_; |
| 39 const int load_flags_; | 40 const int load_flags_; |
| 40 const RequestPriority priority_; | 41 const RequestPriority priority_; |
| 41 | 42 |
| 42 DISALLOW_COPY_AND_ASSIGN(URLRequestStartEventParameters); | 43 DISALLOW_COPY_AND_ASSIGN(URLRequestStartEventParameters); |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 } // namespace net | 46 } // namespace net |
| 46 | 47 |
| 47 #endif // NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ | 48 #endif // NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_ |
| OLD | NEW |