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

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

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/log/net_log_util.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 <utility>
8
7 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
8 #include "base/logging.h" 10 #include "base/logging.h"
9 #include "base/values.h" 11 #include "base/values.h"
10 12
11 namespace net { 13 namespace net {
12 14
13 TestNetLogEntry::TestNetLogEntry(NetLog::EventType type, 15 TestNetLogEntry::TestNetLogEntry(NetLog::EventType type,
14 const base::TimeTicks& time, 16 const base::TimeTicks& time,
15 NetLog::Source source, 17 NetLog::Source source,
16 NetLog::EventPhase phase, 18 NetLog::EventPhase phase,
17 scoped_ptr<base::DictionaryValue> params) 19 scoped_ptr<base::DictionaryValue> params)
18 : type(type), 20 : type(type),
19 time(time), 21 time(time),
20 source(source), 22 source(source),
21 phase(phase), 23 phase(phase),
22 params(params.Pass()) { 24 params(std::move(params)) {
23 // Only entries without a NetLog should have an invalid source. 25 // Only entries without a NetLog should have an invalid source.
24 CHECK(source.IsValid()); 26 CHECK(source.IsValid());
25 } 27 }
26 28
27 TestNetLogEntry::TestNetLogEntry(const TestNetLogEntry& entry) { 29 TestNetLogEntry::TestNetLogEntry(const TestNetLogEntry& entry) {
28 *this = entry; 30 *this = entry;
29 } 31 }
30 32
31 TestNetLogEntry::~TestNetLogEntry() { 33 TestNetLogEntry::~TestNetLogEntry() {
32 } 34 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 76
75 std::string TestNetLogEntry::GetParamsJson() const { 77 std::string TestNetLogEntry::GetParamsJson() const {
76 if (!params) 78 if (!params)
77 return std::string(); 79 return std::string();
78 std::string json; 80 std::string json;
79 base::JSONWriter::Write(*params, &json); 81 base::JSONWriter::Write(*params, &json);
80 return json; 82 return json;
81 } 83 }
82 84
83 } // namespace net 85 } // namespace net
OLDNEW
« no previous file with comments | « net/log/net_log_util.cc ('k') | net/log/trace_net_log_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698