blob: f2e0dceda2892173c3c4a58db45aa681c5f64aff [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001// 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.
4
5#ifndef NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_
6#define NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_
7
8#include <string>
9
10#include "net/base/net_export.h"
11#include "net/base/net_log.h"
12#include "net/base/request_priority.h"
13
14class GURL;
15
16namespace base {
17class Value;
18}
19
20namespace net {
21
22// Returns a Value containing NetLog parameters for starting a URLRequest.
23NET_EXPORT base::Value* NetLogURLRequestStartCallback(
24 const GURL* url,
25 const std::string* method,
26 int load_flags,
27 RequestPriority priority,
28 int64 upload_id,
29 NetLog::LogLevel /* log_level */);
30
31// Attempts to extract the load flags from a Value created by the above
32// function. On success, sets |load_flags| accordingly and returns true.
33// On failure, sets |load_flags| to 0.
34NET_EXPORT bool StartEventLoadFlagsFromEventParams(
35 const base::Value* event_params,
36 int* load_flags);
37
38} // namespace net
39
40#endif // NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_