| 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 #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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |