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 CHROME_BROWSER_NET_CHROME_NET_LOG_H_ | 5 #ifndef CHROME_BROWSER_NET_CHROME_NET_LOG_H_ |
6 #define CHROME_BROWSER_NET_CHROME_NET_LOG_H_ | 6 #define CHROME_BROWSER_NET_CHROME_NET_LOG_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/atomicops.h" | 11 #include "base/atomicops.h" |
12 #include "base/lock.h" | 12 #include "base/lock.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
15 #include "chrome/browser/browser_thread.h" | 15 #include "base/time.h" |
16 #include "net/base/net_log.h" | 16 #include "net/base/net_log.h" |
17 | 17 |
18 class LoadTimingObserver; | 18 class LoadTimingObserver; |
19 class NetLogLogger; | 19 class NetLogLogger; |
20 class PassiveLogCollector; | 20 class PassiveLogCollector; |
21 | 21 |
22 // ChromeNetLog is an implementation of NetLog that dispatches network log | 22 // ChromeNetLog is an implementation of NetLog that dispatches network log |
23 // messages to a list of observers. | 23 // messages to a list of observers. |
24 // | 24 // |
25 // All methods are thread safe, with the exception that no ChromeNetLog or | 25 // All methods are thread safe, with the exception that no ChromeNetLog or |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 scoped_ptr<LoadTimingObserver> load_timing_observer_; | 155 scoped_ptr<LoadTimingObserver> load_timing_observer_; |
156 scoped_ptr<NetLogLogger> net_log_logger_; | 156 scoped_ptr<NetLogLogger> net_log_logger_; |
157 | 157 |
158 // |lock_| must be acquired whenever reading or writing to this. | 158 // |lock_| must be acquired whenever reading or writing to this. |
159 ObserverList<ThreadSafeObserver, true> observers_; | 159 ObserverList<ThreadSafeObserver, true> observers_; |
160 | 160 |
161 DISALLOW_COPY_AND_ASSIGN(ChromeNetLog); | 161 DISALLOW_COPY_AND_ASSIGN(ChromeNetLog); |
162 }; | 162 }; |
163 | 163 |
164 #endif // CHROME_BROWSER_NET_CHROME_NET_LOG_H_ | 164 #endif // CHROME_BROWSER_NET_CHROME_NET_LOG_H_ |
OLD | NEW |