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

Side by Side Diff: net/log/test_net_log_entry.cc

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 years, 7 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/http/transport_security_persister.cc ('k') | net/log/trace_net_log_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/log/test_net_log_entry.h" 5 #include "net/log/test_net_log_entry.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 bool TestNetLogEntry::GetNetErrorCode(int* value) const { 71 bool TestNetLogEntry::GetNetErrorCode(int* value) const {
72 return GetIntegerValue("net_error", value); 72 return GetIntegerValue("net_error", value);
73 } 73 }
74 74
75 std::string TestNetLogEntry::GetParamsJson() const { 75 std::string TestNetLogEntry::GetParamsJson() const {
76 if (!params) 76 if (!params)
77 return std::string(); 77 return std::string();
78 std::string json; 78 std::string json;
79 base::JSONWriter::Write(params.get(), &json); 79 base::JSONWriter::Write(*params, &json);
80 return json; 80 return json;
81 } 81 }
82 82
83 } // namespace net 83 } // namespace net
OLDNEW
« no previous file with comments | « net/http/transport_security_persister.cc ('k') | net/log/trace_net_log_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698