15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <string>
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "net/base/net_export.h"
115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "net/base/net_log.h"
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "net/base/request_priority.h"
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class GURL;
155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace base {
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class Value;
185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace net {
215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Returns a Value containing NetLog parameters for starting a URLRequest.
235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)NET_EXPORT base::Value* NetLogURLRequestStartCallback(
245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    const GURL* url,
255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    const std::string* method,
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    int load_flags,
275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    RequestPriority priority,
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    int64 upload_id,
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    NetLog::LogLevel /* log_level */);
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Attempts to extract the load flags from a Value created by the above
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// function.  On success, sets |load_flags| accordingly and returns true.
335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// On failure, sets |load_flags| to 0.
345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)NET_EXPORT bool StartEventLoadFlagsFromEventParams(
355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    const base::Value* event_params,
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    int* load_flags);
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}  // namespace net
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif  // NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_
41