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/test_net_log.h" | 5 #include "net/log/test_net_log.h" |
6 | 6 |
7 #include "base/synchronization/lock.h" | 7 #include "base/synchronization/lock.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 | 9 |
10 namespace net { | 10 namespace net { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 } | 75 } |
76 | 76 |
77 TestNetLog::~TestNetLog() { | 77 TestNetLog::~TestNetLog() { |
78 DeprecatedRemoveObserver(observer_.get()); | 78 DeprecatedRemoveObserver(observer_.get()); |
79 } | 79 } |
80 | 80 |
81 void TestNetLog::SetCaptureMode(NetLogCaptureMode capture_mode) { | 81 void TestNetLog::SetCaptureMode(NetLogCaptureMode capture_mode) { |
82 SetObserverCaptureMode(observer_.get(), capture_mode); | 82 SetObserverCaptureMode(observer_.get(), capture_mode); |
83 } | 83 } |
84 | 84 |
| 85 NetLogCaptureMode TestNetLog::GetCaptureMode() const { |
| 86 return observer_->capture_mode(); |
| 87 } |
| 88 |
85 void TestNetLog::GetEntries(TestNetLogEntry::List* entry_list) const { | 89 void TestNetLog::GetEntries(TestNetLogEntry::List* entry_list) const { |
86 observer_->GetEntries(entry_list); | 90 observer_->GetEntries(entry_list); |
87 } | 91 } |
88 | 92 |
89 void TestNetLog::GetEntriesForSource(NetLog::Source source, | 93 void TestNetLog::GetEntriesForSource(NetLog::Source source, |
90 TestNetLogEntry::List* entry_list) const { | 94 TestNetLogEntry::List* entry_list) const { |
91 observer_->GetEntriesForSource(source, entry_list); | 95 observer_->GetEntriesForSource(source, entry_list); |
92 } | 96 } |
93 | 97 |
94 size_t TestNetLog::GetSize() const { | 98 size_t TestNetLog::GetSize() const { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 130 |
127 void BoundTestNetLog::Clear() { | 131 void BoundTestNetLog::Clear() { |
128 test_net_log_.Clear(); | 132 test_net_log_.Clear(); |
129 } | 133 } |
130 | 134 |
131 void BoundTestNetLog::SetCaptureMode(NetLogCaptureMode capture_mode) { | 135 void BoundTestNetLog::SetCaptureMode(NetLogCaptureMode capture_mode) { |
132 test_net_log_.SetCaptureMode(capture_mode); | 136 test_net_log_.SetCaptureMode(capture_mode); |
133 } | 137 } |
134 | 138 |
135 } // namespace net | 139 } // namespace net |
OLD | NEW |