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

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

Issue 1549483004: Make ParametersToValue return scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Created 4 years, 11 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.h ('k') | net/log/test_net_log.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 (c) 2012 The Chromium Authors. All rights reserved. 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 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/net_log.h" 5 #include "net/log/net_log.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 if (data_->parameters_callback) { 155 if (data_->parameters_callback) {
156 scoped_ptr<base::Value> value( 156 scoped_ptr<base::Value> value(
157 data_->parameters_callback->Run(capture_mode_)); 157 data_->parameters_callback->Run(capture_mode_));
158 if (value) 158 if (value)
159 entry_dict->Set("params", std::move(value)); 159 entry_dict->Set("params", std::move(value));
160 } 160 }
161 161
162 return entry_dict.release(); 162 return entry_dict.release();
163 } 163 }
164 164
165 base::Value* NetLog::Entry::ParametersToValue() const { 165 scoped_ptr<base::Value> NetLog::Entry::ParametersToValue() const {
166 if (data_->parameters_callback) 166 if (data_->parameters_callback)
167 return data_->parameters_callback->Run(capture_mode_).release(); 167 return data_->parameters_callback->Run(capture_mode_);
168 return NULL; 168 return nullptr;
169 } 169 }
170 170
171 NetLog::EntryData::EntryData(EventType type, 171 NetLog::EntryData::EntryData(EventType type,
172 Source source, 172 Source source,
173 EventPhase phase, 173 EventPhase phase,
174 base::TimeTicks time, 174 base::TimeTicks time,
175 const ParametersCallback* parameters_callback) 175 const ParametersCallback* parameters_callback)
176 : type(type), 176 : type(type),
177 source(source), 177 source(source),
178 phase(phase), 178 phase(phase),
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 Liveness liveness = liveness_; 484 Liveness liveness = liveness_;
485 485
486 if (liveness == ALIVE) 486 if (liveness == ALIVE)
487 return; 487 return;
488 488
489 base::debug::Alias(&liveness); 489 base::debug::Alias(&liveness);
490 CHECK_EQ(ALIVE, liveness); 490 CHECK_EQ(ALIVE, liveness);
491 } 491 }
492 492
493 } // namespace net 493 } // namespace net
OLDNEW
« no previous file with comments | « net/log/net_log.h ('k') | net/log/test_net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698