Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1113)

Side by Side Diff: net/log/trace_net_log_observer.cc

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/log/test_net_log.cc ('k') | net/log/write_to_file_net_log_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/log/test_net_log.cc ('k') | net/log/write_to_file_net_log_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698