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

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

Issue 1549483004: Make ParametersToValue return scoped_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | net/log/net_log.cc » ('j') | net/log/net_log.cc » ('J')
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 #ifndef NET_LOG_NET_LOG_H_ 5 #ifndef NET_LOG_NET_LOG_H_
6 #define NET_LOG_NET_LOG_H_ 6 #define NET_LOG_NET_LOG_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 Source source() const { return data_->source; } 131 Source source() const { return data_->source; }
132 EventPhase phase() const { return data_->phase; } 132 EventPhase phase() const { return data_->phase; }
133 133
134 // Serializes the specified event to a Value. The Value also includes the 134 // Serializes the specified event to a Value. The Value also includes the
135 // current time. Caller takes ownership of returned Value. Takes in a time 135 // current time. Caller takes ownership of returned Value. Takes in a time
136 // to allow back-dating entries. 136 // to allow back-dating entries.
137 base::Value* ToValue() const; 137 base::Value* ToValue() const;
138 138
139 // Returns the parameters as a Value. Returns NULL if there are no 139 // Returns the parameters as a Value. Returns NULL if there are no
140 // parameters. Caller takes ownership of returned Value. 140 // parameters. Caller takes ownership of returned Value.
141 base::Value* ParametersToValue() const; 141 scoped_ptr<base::Value> ParametersToValue() const;
mmenke 2015/12/28 16:46:39 nit: include base/memory/scoped_ptr.h
142 142
143 private: 143 private:
144 const EntryData* const data_; 144 const EntryData* const data_;
145 145
146 // Log capture mode when the event occurred. 146 // Log capture mode when the event occurred.
147 const NetLogCaptureMode capture_mode_; 147 const NetLogCaptureMode capture_mode_;
148 148
149 // It is not safe to copy this class, since |parameters_callback_| may 149 // It is not safe to copy this class, since |parameters_callback_| may
150 // include pointers that become stale immediately after the event is added, 150 // include pointers that become stale immediately after the event is added,
151 // even if the code were modified to keep its own copy of the callback. 151 // even if the code were modified to keep its own copy of the callback.
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 NetLog::Source source_; 390 NetLog::Source source_;
391 NetLog* net_log_; 391 NetLog* net_log_;
392 392
393 // TODO(eroman): Temporary until crbug.com/467797 is solved. 393 // TODO(eroman): Temporary until crbug.com/467797 is solved.
394 Liveness liveness_ = ALIVE; 394 Liveness liveness_ = ALIVE;
395 }; 395 };
396 396
397 } // namespace net 397 } // namespace net
398 398
399 #endif // NET_LOG_NET_LOG_H_ 399 #endif // NET_LOG_NET_LOG_H_
OLDNEW
« no previous file with comments | « no previous file | net/log/net_log.cc » ('j') | net/log/net_log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698