OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BASE_CAPTURING_NET_LOG_H_ | 5 #ifndef NET_BASE_CAPTURING_NET_LOG_H_ |
6 #define NET_BASE_CAPTURING_NET_LOG_H_ | 6 #define NET_BASE_CAPTURING_NET_LOG_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 explicit CapturingNetLog(size_t max_num_entries); | 47 explicit CapturingNetLog(size_t max_num_entries); |
48 virtual ~CapturingNetLog(); | 48 virtual ~CapturingNetLog(); |
49 | 49 |
50 // NetLog implementation: | 50 // NetLog implementation: |
51 virtual void AddEntry(EventType type, | 51 virtual void AddEntry(EventType type, |
52 const base::TimeTicks& time, | 52 const base::TimeTicks& time, |
53 const Source& source, | 53 const Source& source, |
54 EventPhase phase, | 54 EventPhase phase, |
55 EventParameters* extra_parameters); | 55 EventParameters* extra_parameters); |
56 virtual uint32 NextID(); | 56 virtual uint32 NextID(); |
57 virtual LogLevel GetLogLevel() const { return LOG_ALL_BUT_BYTES; } | 57 virtual LogLevel GetLogLevel() const; |
58 | 58 |
59 // Returns the list of all entries in the log. | 59 // Returns the list of all entries in the log. |
60 void GetEntries(EntryList* entry_list) const; | 60 void GetEntries(EntryList* entry_list) const; |
61 | 61 |
62 void Clear(); | 62 void Clear(); |
63 | 63 |
64 private: | 64 private: |
65 // Needs to be "mutable" so can use it in GetEntries(). | 65 // Needs to be "mutable" so can use it in GetEntries(). |
66 mutable Lock lock_; | 66 mutable Lock lock_; |
67 | 67 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 NetLog::Source source_; | 101 NetLog::Source source_; |
102 scoped_ptr<CapturingNetLog> capturing_net_log_; | 102 scoped_ptr<CapturingNetLog> capturing_net_log_; |
103 | 103 |
104 DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog); | 104 DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog); |
105 }; | 105 }; |
106 | 106 |
107 } // namespace net | 107 } // namespace net |
108 | 108 |
109 #endif // NET_BASE_CAPTURING_NET_LOG_H_ | 109 #endif // NET_BASE_CAPTURING_NET_LOG_H_ |
110 | 110 |
OLD | NEW |