| 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 URLRequestStartEventParameters::URLRequestStartEventParameters( | 9 URLRequestStartEventParameters::URLRequestStartEventParameters( |
| 10 const GURL& url, | 10 const GURL& url, |
| 11 const std::string& method, | 11 const std::string& method, |
| 12 int load_flags, | 12 int load_flags, |
| 13 net::RequestPriority priority) | 13 net::RequestPriority priority) |
| 14 : url_(url), | 14 : url_(url), |
| 15 method_(method), | 15 method_(method), |
| 16 load_flags_(load_flags), | 16 load_flags_(load_flags), |
| 17 priority_(priority) { | 17 priority_(priority) { |
| 18 } | 18 } |
| 19 | 19 |
| 20 Value* URLRequestStartEventParameters::ToValue() const { | 20 Value* URLRequestStartEventParameters::ToValue() const { |
| 21 DictionaryValue* dict = new DictionaryValue(); | 21 DictionaryValue* dict = new DictionaryValue(); |
| 22 dict->SetString(L"url", url_.possibly_invalid_spec()); | 22 dict->SetString("url", url_.possibly_invalid_spec()); |
| 23 dict->SetString(L"method", method_); | 23 dict->SetString("method", method_); |
| 24 dict->SetInteger(L"load_flags", load_flags_); | 24 dict->SetInteger("load_flags", load_flags_); |
| 25 dict->SetInteger(L"priority", static_cast<int>(priority_)); | 25 dict->SetInteger("priority", static_cast<int>(priority_)); |
| 26 return dict; | 26 return dict; |
| 27 } | 27 } |
| OLD | NEW |