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 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
13 #include "base/time.h" | |
14 #include "net/base/net_log.h" | 13 #include "net/base/net_log.h" |
15 | 14 |
16 namespace net { | 15 namespace net { |
17 | 16 |
18 // CapturingNetLog is an implementation of NetLog that saves messages to a | 17 // CapturingNetLog is an implementation of NetLog that saves messages to a |
19 // bounded buffer. | 18 // bounded buffer. |
20 class CapturingNetLog : public NetLog { | 19 class CapturingNetLog : public NetLog { |
21 public: | 20 public: |
22 struct Entry { | 21 struct Entry { |
23 Entry(EventType type, | 22 Entry(EventType type, |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 NetLog::Source source_; | 100 NetLog::Source source_; |
102 scoped_ptr<CapturingNetLog> capturing_net_log_; | 101 scoped_ptr<CapturingNetLog> capturing_net_log_; |
103 | 102 |
104 DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog); | 103 DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog); |
105 }; | 104 }; |
106 | 105 |
107 } // namespace net | 106 } // namespace net |
108 | 107 |
109 #endif // NET_BASE_CAPTURING_NET_LOG_H_ | 108 #endif // NET_BASE_CAPTURING_NET_LOG_H_ |
110 | 109 |
OLD | NEW |