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