Chromium Code Reviews| 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 #include "net/url_request/url_request_netlog_params.h" | 5 #include "net/url_request/url_request_netlog_params.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 | 10 |
| 11 URLRequestStartEventParameters::URLRequestStartEventParameters( | 11 URLRequestStartEventParameters::URLRequestStartEventParameters( |
| 12 const GURL& url, | 12 const GURL& url, |
| 13 const std::string& method, | 13 const std::string& method, |
| 14 int load_flags, | 14 int load_flags, |
| 15 RequestPriority priority) | 15 RequestPriority priority) |
| 16 : url_(url), | 16 : url_(url), |
| 17 method_(method), | 17 method_(method), |
| 18 load_flags_(load_flags), | 18 load_flags_(load_flags), |
| 19 priority_(priority) { | 19 priority_(priority) { |
| 20 } | 20 } |
| 21 | 21 |
| 22 URLRequestStartEventParameters::~URLRequestStartEventParameters() {} | |
|
eroman
2012/04/13 18:59:34
match declaration order.
| |
| 23 | |
| 22 Value* URLRequestStartEventParameters::ToValue() const { | 24 Value* URLRequestStartEventParameters::ToValue() const { |
| 23 DictionaryValue* dict = new DictionaryValue(); | 25 DictionaryValue* dict = new DictionaryValue(); |
| 24 dict->SetString("url", url_.possibly_invalid_spec()); | 26 dict->SetString("url", url_.possibly_invalid_spec()); |
| 25 dict->SetString("method", method_); | 27 dict->SetString("method", method_); |
| 26 dict->SetInteger("load_flags", load_flags_); | 28 dict->SetInteger("load_flags", load_flags_); |
| 27 dict->SetInteger("priority", static_cast<int>(priority_)); | 29 dict->SetInteger("priority", static_cast<int>(priority_)); |
| 28 return dict; | 30 return dict; |
| 29 } | 31 } |
| 30 | 32 |
| 31 } // namespace net | 33 } // namespace net |
| OLD | NEW |