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

Side by Side Diff: net/log/capturing_net_log.h

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add header for std::max 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
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 #ifndef NET_LOG_CAPTURING_NET_LOG_H_ 5 #ifndef NET_LOG_CAPTURING_NET_LOG_H_
6 #define NET_LOG_CAPTURING_NET_LOG_H_ 6 #define NET_LOG_CAPTURING_NET_LOG_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 10 matching lines...) Expand all
21 // net_test_support project. 21 // net_test_support project.
22 class CapturingNetLog : public NetLog { 22 class CapturingNetLog : public NetLog {
23 public: 23 public:
24 // TODO(mmenke): Get rid of these. 24 // TODO(mmenke): Get rid of these.
25 typedef CapturedNetLogEntry CapturedEntry; 25 typedef CapturedNetLogEntry CapturedEntry;
26 typedef CapturedNetLogEntry::List CapturedEntryList; 26 typedef CapturedNetLogEntry::List CapturedEntryList;
27 27
28 CapturingNetLog(); 28 CapturingNetLog();
29 ~CapturingNetLog() override; 29 ~CapturingNetLog() override;
30 30
31 void SetLogLevel(LogLevel log_level); 31 void SetCaptureMode(NetLogCaptureMode capture_mode);
32 32
33 // Below methods are forwarded to capturing_net_log_observer_. 33 // Below methods are forwarded to capturing_net_log_observer_.
34 void GetEntries(CapturedEntryList* entry_list) const; 34 void GetEntries(CapturedEntryList* entry_list) const;
35 void GetEntriesForSource(Source source, CapturedEntryList* entry_list) const; 35 void GetEntriesForSource(Source source, CapturedEntryList* entry_list) const;
36 size_t GetSize() const; 36 size_t GetSize() const;
37 void Clear(); 37 void Clear();
38 38
39 private: 39 private:
40 CapturingNetLogObserver capturing_net_log_observer_; 40 CapturingNetLogObserver capturing_net_log_observer_;
41 41
(...skipping 19 matching lines...) Expand all
61 // Fills |entry_list| with all entries in the log from the specified Source. 61 // Fills |entry_list| with all entries in the log from the specified Source.
62 void GetEntriesForSource( 62 void GetEntriesForSource(
63 NetLog::Source source, 63 NetLog::Source source,
64 CapturingNetLog::CapturedEntryList* entry_list) const; 64 CapturingNetLog::CapturedEntryList* entry_list) const;
65 65
66 // Returns number of entries in the log. 66 // Returns number of entries in the log.
67 size_t GetSize() const; 67 size_t GetSize() const;
68 68
69 void Clear(); 69 void Clear();
70 70
71 // Sets the log level of the underlying CapturingNetLog. 71 // Sets the capture mode of the underlying CapturingNetLog.
72 void SetLogLevel(NetLog::LogLevel log_level); 72 void SetCaptureMode(NetLogCaptureMode capture_mode);
73 73
74 private: 74 private:
75 CapturingNetLog capturing_net_log_; 75 CapturingNetLog capturing_net_log_;
76 const BoundNetLog net_log_; 76 const BoundNetLog net_log_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog); 78 DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog);
79 }; 79 };
80 80
81 } // namespace net 81 } // namespace net
82 82
83 #endif // NET_LOG_CAPTURING_NET_LOG_H_ 83 #endif // NET_LOG_CAPTURING_NET_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698