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
3 // found in the LICENSE file.
5 #include "net/url_request/url_request_netlog_params.h"
7 #include "base/strings/string_number_conversions.h"
8 #include "base/values.h"
13 base::Value
* NetLogURLRequestStartCallback(const GURL
* url
,
14 const std::string
* method
,
16 RequestPriority priority
,
18 NetLog::LogLevel
/* log_level */) {
19 base::DictionaryValue
* dict
= new base::DictionaryValue();
20 dict
->SetString("url", url
->possibly_invalid_spec());
21 dict
->SetString("method", *method
);
22 dict
->SetInteger("load_flags", load_flags
);
23 dict
->SetString("priority", RequestPriorityToString(priority
));
25 dict
->SetString("upload_id", base::Int64ToString(upload_id
));
29 bool StartEventLoadFlagsFromEventParams(const base::Value
* event_params
,
31 const base::DictionaryValue
* dict
;
32 if (!event_params
->GetAsDictionary(&dict
) ||
33 !dict
->GetInteger("load_flags", load_flags
)) {