Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 DictionaryValue* dict = new DictionaryValue(); | 23 DictionaryValue* dict = new DictionaryValue(); |
| 24 dict->SetString("url", url_.possibly_invalid_spec()); | 24 dict->SetString("url", url_.possibly_invalid_spec()); |
| 25 dict->SetString("method", method_); | 25 dict->SetString("method", method_); |
| 26 dict->SetInteger("load_flags", load_flags_); | 26 dict->SetInteger("load_flags", load_flags_); |
| 27 dict->SetInteger("priority", static_cast<int>(priority_)); | 27 dict->SetInteger("priority", static_cast<int>(priority_)); |
| 28 return dict; | 28 return dict; |
| 29 } | 29 } |
| 30 | 30 |
| 31 URLRequestStartEventParameters::~URLRequestStartEventParameters() {} | 31 URLRequestStartEventParameters::~URLRequestStartEventParameters() {} |
| 32 | 32 |
| 33 bool StartEventLoadFlagsFromEventParameters(Value* event_params, | |
|
eroman
2012/05/22 22:08:06
|const Value*|
| |
| 34 int* load_flags) { | |
| 35 DictionaryValue* dict; | |
| 36 if (!event_params->GetAsDictionary(&dict) || | |
| 37 !dict->GetInteger("load_flags", load_flags)) { | |
| 38 *load_flags = 0; | |
| 39 return false; | |
| 40 } | |
| 41 return true; | |
| 42 } | |
| 43 | |
| 33 } // namespace net | 44 } // namespace net |
| OLD | NEW |