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

Side by Side Diff: net/log/test_net_log.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.h ('k') | net/log/trace_net_log_observer.cc » ('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 (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 namespace net { 7 namespace net {
8 8
9 TestNetLog::TestNetLog() { 9 TestNetLog::TestNetLog() {
10 DeprecatedAddObserver(&capturing_net_log_observer_, LOG_ALL_BUT_BYTES); 10 DeprecatedAddObserver(&capturing_net_log_observer_,
11 NetLogCaptureMode::IncludeCookiesAndCredentials());
11 } 12 }
12 13
13 TestNetLog::~TestNetLog() { 14 TestNetLog::~TestNetLog() {
14 DeprecatedRemoveObserver(&capturing_net_log_observer_); 15 DeprecatedRemoveObserver(&capturing_net_log_observer_);
15 } 16 }
16 17
17 void TestNetLog::SetLogLevel(NetLog::LogLevel log_level) { 18 void TestNetLog::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 TestNetLog::GetEntries(TestNetLog::CapturedEntryList* entry_list) const { 22 void TestNetLog::GetEntries(TestNetLog::CapturedEntryList* entry_list) const {
22 capturing_net_log_observer_.GetEntries(entry_list); 23 capturing_net_log_observer_.GetEntries(entry_list);
23 } 24 }
24 25
25 void TestNetLog::GetEntriesForSource(NetLog::Source source, 26 void TestNetLog::GetEntriesForSource(NetLog::Source source,
26 CapturedEntryList* entry_list) const { 27 CapturedEntryList* entry_list) const {
27 capturing_net_log_observer_.GetEntriesForSource(source, entry_list); 28 capturing_net_log_observer_.GetEntriesForSource(source, entry_list);
28 } 29 }
(...skipping 26 matching lines...) Expand all
55 } 56 }
56 57
57 size_t BoundTestNetLog::GetSize() const { 58 size_t BoundTestNetLog::GetSize() const {
58 return capturing_net_log_.GetSize(); 59 return capturing_net_log_.GetSize();
59 } 60 }
60 61
61 void BoundTestNetLog::Clear() { 62 void BoundTestNetLog::Clear() {
62 capturing_net_log_.Clear(); 63 capturing_net_log_.Clear();
63 } 64 }
64 65
65 void BoundTestNetLog::SetLogLevel(NetLog::LogLevel log_level) { 66 void BoundTestNetLog::SetCaptureMode(NetLogCaptureMode capture_mode) {
66 capturing_net_log_.SetLogLevel(log_level); 67 capturing_net_log_.SetCaptureMode(capture_mode);
67 } 68 }
68 69
69 } // namespace net 70 } // namespace net
OLDNEW
« no previous file with comments | « net/log/test_net_log.h ('k') | net/log/trace_net_log_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698