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 #include "net/log/net_log.h" | 5 #include "net/log/net_log.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/debug/alias.h" | 8 #include "base/debug/alias.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 if (data_->parameters_callback) { | 153 if (data_->parameters_callback) { |
| 154 scoped_ptr<base::Value> value( | 154 scoped_ptr<base::Value> value( |
| 155 data_->parameters_callback->Run(capture_mode_)); | 155 data_->parameters_callback->Run(capture_mode_)); |
| 156 if (value) | 156 if (value) |
| 157 entry_dict->Set("params", value.Pass()); | 157 entry_dict->Set("params", value.Pass()); |
| 158 } | 158 } |
| 159 | 159 |
| 160 return entry_dict.release(); | 160 return entry_dict.release(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 base::Value* NetLog::Entry::ParametersToValue() const { | 163 scoped_ptr<base::Value> NetLog::Entry::ParametersToValue() const { |
| 164 if (data_->parameters_callback) | 164 if (data_->parameters_callback) |
| 165 return data_->parameters_callback->Run(capture_mode_).release(); | 165 return data_->parameters_callback->Run(capture_mode_); |
| 166 return NULL; | 166 return scoped_ptr<base::Value>(nullptr); |
|
mmenke
2015/12/28 16:46:39
I think you can just do return nullptr here? If t
| |
| 167 } | 167 } |
| 168 | 168 |
| 169 NetLog::EntryData::EntryData(EventType type, | 169 NetLog::EntryData::EntryData(EventType type, |
| 170 Source source, | 170 Source source, |
| 171 EventPhase phase, | 171 EventPhase phase, |
| 172 base::TimeTicks time, | 172 base::TimeTicks time, |
| 173 const ParametersCallback* parameters_callback) | 173 const ParametersCallback* parameters_callback) |
| 174 : type(type), | 174 : type(type), |
| 175 source(source), | 175 source(source), |
| 176 phase(phase), | 176 phase(phase), |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 482 Liveness liveness = liveness_; | 482 Liveness liveness = liveness_; |
| 483 | 483 |
| 484 if (liveness == ALIVE) | 484 if (liveness == ALIVE) |
| 485 return; | 485 return; |
| 486 | 486 |
| 487 base::debug::Alias(&liveness); | 487 base::debug::Alias(&liveness); |
| 488 CHECK_EQ(ALIVE, liveness); | 488 CHECK_EQ(ALIVE, liveness); |
| 489 } | 489 } |
| 490 | 490 |
| 491 } // namespace net | 491 } // namespace net |
| OLD | NEW |