diff options
author | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-14 21:52:36 +0000 |
---|---|---|
committer | eroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-14 21:52:36 +0000 |
commit | 26128342336043f70169489df27729ea97301972 (patch) | |
tree | 3c5cf414de217bbf8d6eac0f4e1ea1a45499663c /net/url_request/url_request_netlog_params.cc | |
parent | 44603d54d54c8065abab89285404541f7288890e (diff) | |
download | chromium_src-26128342336043f70169489df27729ea97301972.zip chromium_src-26128342336043f70169489df27729ea97301972.tar.gz chromium_src-26128342336043f70169489df27729ea97301972.tar.bz2 |
Add the URLRequest's method and load flags to the NetLog.
BUG=37421
Review URL: http://codereview.chromium.org/2108003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47321 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_netlog_params.cc')
-rw-r--r-- | net/url_request/url_request_netlog_params.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/net/url_request/url_request_netlog_params.cc b/net/url_request/url_request_netlog_params.cc new file mode 100644 index 0000000..d432e79 --- /dev/null +++ b/net/url_request/url_request_netlog_params.cc @@ -0,0 +1,20 @@ +// 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. + +#include "net/url_request/url_request_netlog_params.h" + +#include "base/values.h" + +URLRequestStartEventParameters::URLRequestStartEventParameters( + const GURL& url, const std::string& method, int load_flags) + : url_(url), method_(method), load_flags_(load_flags) {} + +Value* URLRequestStartEventParameters::ToValue() const { + DictionaryValue* dict = new DictionaryValue(); + dict->SetString(L"url", url_.possibly_invalid_spec()); + dict->SetString(L"method", method_); + dict->SetInteger(L"load_flags", load_flags_); + return dict; +} + |