summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_netlog_params.h
blob: 8b275b9e816aea1e0b45d98ac848ffb5df785eb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_
#define NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_
#pragma once

#include <string>

#include "base/basictypes.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_log.h"
#include "net/base/request_priority.h"

namespace net {

// Holds the parameters to emit to the NetLog when starting a URLRequest.
class URLRequestStartEventParameters : public NetLog::EventParameters {
 public:
  URLRequestStartEventParameters(const GURL& url,
                                 const std::string& method,
                                 int load_flags,
                                 RequestPriority priority);

  const GURL& url() const {
    return url_;
  }

  int load_flags() const {
    return load_flags_;
  }

  virtual Value* ToValue() const;

 private:
  const GURL url_;
  const std::string method_;
  const int load_flags_;
  const RequestPriority priority_;

  DISALLOW_COPY_AND_ASSIGN(URLRequestStartEventParameters);
};

}  // namespace net

#endif  // NET_URL_REQUEST_URL_REQUEST_NETLOG_PARAMS_H_