| OLD | NEW |
| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool TestNetLogEntry::GetNetErrorCode(int* value) const { | 64 bool TestNetLogEntry::GetNetErrorCode(int* value) const { |
| 65 return GetIntegerValue("net_error", value); | 65 return GetIntegerValue("net_error", value); |
| 66 } | 66 } |
| 67 | 67 |
| 68 std::string TestNetLogEntry::GetParamsJson() const { | 68 std::string TestNetLogEntry::GetParamsJson() const { |
| 69 if (!params) | 69 if (!params) |
| 70 return std::string(); | 70 return std::string(); |
| 71 std::string json; | 71 std::string json; |
| 72 base::JSONWriter::Write(params.get(), &json); | 72 base::JSONWriter::Write(*params, &json); |
| 73 return json; | 73 return json; |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace net | 76 } // namespace net |
| OLD | NEW |