Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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_ |
| OLD | NEW |