| 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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 const NetLogSource& source, | 272 const NetLogSource& source, |
| 273 NetLogEventPhase phase, | 273 NetLogEventPhase phase, |
| 274 const NetLogParametersCallback* parameters_callback) { | 274 const NetLogParametersCallback* parameters_callback) { |
| 275 if (!IsCapturing()) | 275 if (!IsCapturing()) |
| 276 return; | 276 return; |
| 277 NetLogEntryData entry_data(type, source, phase, base::TimeTicks::Now(), | 277 NetLogEntryData entry_data(type, source, phase, base::TimeTicks::Now(), |
| 278 parameters_callback); | 278 parameters_callback); |
| 279 | 279 |
| 280 // Notify all of the log observers. | 280 // Notify all of the log observers. |
| 281 base::AutoLock lock(lock_); | 281 base::AutoLock lock(lock_); |
| 282 FOR_EACH_OBSERVER(ThreadSafeObserver, observers_, OnAddEntryData(entry_data)); | 282 for (auto& observer : observers_) |
| 283 observer.OnAddEntryData(entry_data); |
| 283 } | 284 } |
| 284 | 285 |
| 285 } // namespace net | 286 } // namespace net |
| OLD | NEW |