Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(803)

Side by Side Diff: net/url_request/url_request_netlog_params.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/url_request/url_request_netlog_params.h ('k') | net/url_request/url_request_redirect_job.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "net/url_request/url_request_netlog_params.h"
6
7 #include "base/strings/string_number_conversions.h"
8 #include "base/values.h"
9 #include "url/gurl.h"
10
11 namespace net {
12
13 base::Value* NetLogURLRequestStartCallback(const GURL* url,
14 const std::string* method,
15 int load_flags,
16 RequestPriority priority,
17 int64 upload_id,
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));
24 if (upload_id > -1)
25 dict->SetString("upload_id", base::Int64ToString(upload_id));
26 return dict;
27 }
28
29 bool StartEventLoadFlagsFromEventParams(const base::Value* event_params,
30 int* load_flags) {
31 const base::DictionaryValue* dict;
32 if (!event_params->GetAsDictionary(&dict) ||
33 !dict->GetInteger("load_flags", load_flags)) {
34 *load_flags = 0;
35 return false;
36 }
37 return true;
38 }
39
40 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_netlog_params.h ('k') | net/url_request/url_request_redirect_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698