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/capturing_net_log.h" | 5 #include "net/log/capturing_net_log.h" |
6 | 6 |
7 namespace net { | 7 namespace net { |
8 | 8 |
9 CapturingNetLog::CapturingNetLog() { | 9 CapturingNetLog::CapturingNetLog() { |
10 DeprecatedAddObserver(&capturing_net_log_observer_, LOG_ALL_BUT_BYTES); | 10 DeprecatedAddObserver(&capturing_net_log_observer_, |
| 11 NetLogCaptureMode::AllButBytes()); |
11 } | 12 } |
12 | 13 |
13 CapturingNetLog::~CapturingNetLog() { | 14 CapturingNetLog::~CapturingNetLog() { |
14 DeprecatedRemoveObserver(&capturing_net_log_observer_); | 15 DeprecatedRemoveObserver(&capturing_net_log_observer_); |
15 } | 16 } |
16 | 17 |
17 void CapturingNetLog::SetLogLevel(NetLog::LogLevel log_level) { | 18 void CapturingNetLog::SetCaptureMode(NetLogCaptureMode capture_mode) { |
18 SetObserverLogLevel(&capturing_net_log_observer_, log_level); | 19 SetObserverCaptureMode(&capturing_net_log_observer_, capture_mode); |
19 } | 20 } |
20 | 21 |
21 void CapturingNetLog::GetEntries( | 22 void CapturingNetLog::GetEntries( |
22 CapturingNetLog::CapturedEntryList* entry_list) const { | 23 CapturingNetLog::CapturedEntryList* entry_list) const { |
23 capturing_net_log_observer_.GetEntries(entry_list); | 24 capturing_net_log_observer_.GetEntries(entry_list); |
24 } | 25 } |
25 | 26 |
26 void CapturingNetLog::GetEntriesForSource(NetLog::Source source, | 27 void CapturingNetLog::GetEntriesForSource(NetLog::Source source, |
27 CapturedEntryList* entry_list) const { | 28 CapturedEntryList* entry_list) const { |
28 capturing_net_log_observer_.GetEntriesForSource(source, entry_list); | 29 capturing_net_log_observer_.GetEntriesForSource(source, entry_list); |
(...skipping 27 matching lines...) Expand all Loading... |
56 } | 57 } |
57 | 58 |
58 size_t CapturingBoundNetLog::GetSize() const { | 59 size_t CapturingBoundNetLog::GetSize() const { |
59 return capturing_net_log_.GetSize(); | 60 return capturing_net_log_.GetSize(); |
60 } | 61 } |
61 | 62 |
62 void CapturingBoundNetLog::Clear() { | 63 void CapturingBoundNetLog::Clear() { |
63 capturing_net_log_.Clear(); | 64 capturing_net_log_.Clear(); |
64 } | 65 } |
65 | 66 |
66 void CapturingBoundNetLog::SetLogLevel(NetLog::LogLevel log_level) { | 67 void CapturingBoundNetLog::SetCaptureMode(NetLogCaptureMode capture_mode) { |
67 capturing_net_log_.SetLogLevel(log_level); | 68 capturing_net_log_.SetCaptureMode(capture_mode); |
68 } | 69 } |
69 | 70 |
70 } // namespace net | 71 } // namespace net |
OLD | NEW |