OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/trace_net_log_observer.h" | 5 #include "net/log/trace_net_log_observer.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 void TraceNetLogObserver::StopWatchForTraceStart() { | 93 void TraceNetLogObserver::StopWatchForTraceStart() { |
94 // Should only stop if is currently watching. | 94 // Should only stop if is currently watching. |
95 DCHECK(net_log_to_watch_); | 95 DCHECK(net_log_to_watch_); |
96 base::trace_event::TraceLog::GetInstance()->RemoveEnabledStateObserver(this); | 96 base::trace_event::TraceLog::GetInstance()->RemoveEnabledStateObserver(this); |
97 if (net_log()) | 97 if (net_log()) |
98 net_log()->DeprecatedRemoveObserver(this); | 98 net_log()->DeprecatedRemoveObserver(this); |
99 net_log_to_watch_ = NULL; | 99 net_log_to_watch_ = NULL; |
100 } | 100 } |
101 | 101 |
102 void TraceNetLogObserver::OnTraceLogEnabled() { | 102 void TraceNetLogObserver::OnTraceLogEnabled() { |
103 net_log_to_watch_->DeprecatedAddObserver(this, | 103 net_log_to_watch_->DeprecatedAddObserver(this, NetLogCaptureMode::Default()); |
104 NetLog::LOG_STRIP_PRIVATE_DATA); | |
105 } | 104 } |
106 | 105 |
107 void TraceNetLogObserver::OnTraceLogDisabled() { | 106 void TraceNetLogObserver::OnTraceLogDisabled() { |
108 if (net_log()) | 107 if (net_log()) |
109 net_log()->DeprecatedRemoveObserver(this); | 108 net_log()->DeprecatedRemoveObserver(this); |
110 } | 109 } |
111 | 110 |
112 } // namespace net | 111 } // namespace net |
OLD | NEW |