OLD | NEW |
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 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 | 7 |
8 #include "base/atomicops.h" | 8 #include "base/atomicops.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
12 #include "base/time.h" | |
13 #include "net/base/net_log.h" | 12 #include "net/base/net_log.h" |
14 | 13 |
15 class LoadTimingObserver; | 14 class LoadTimingObserver; |
16 class NetLogLogger; | 15 class NetLogLogger; |
17 | 16 |
18 // ChromeNetLog is an implementation of NetLog that dispatches network log | 17 // ChromeNetLog is an implementation of NetLog that dispatches network log |
19 // messages to a list of observers. | 18 // messages to a list of observers. |
20 // | 19 // |
21 // All methods are thread safe, with the exception that no NetLog or | 20 // All methods are thread safe, with the exception that no NetLog or |
22 // NetLog::ThreadSafeObserver functions may be called by an observer's | 21 // NetLog::ThreadSafeObserver functions may be called by an observer's |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 scoped_ptr<LoadTimingObserver> load_timing_observer_; | 62 scoped_ptr<LoadTimingObserver> load_timing_observer_; |
64 scoped_ptr<NetLogLogger> net_log_logger_; | 63 scoped_ptr<NetLogLogger> net_log_logger_; |
65 | 64 |
66 // |lock_| must be acquired whenever reading or writing to this. | 65 // |lock_| must be acquired whenever reading or writing to this. |
67 ObserverList<ThreadSafeObserver, true> observers_; | 66 ObserverList<ThreadSafeObserver, true> observers_; |
68 | 67 |
69 DISALLOW_COPY_AND_ASSIGN(ChromeNetLog); | 68 DISALLOW_COPY_AND_ASSIGN(ChromeNetLog); |
70 }; | 69 }; |
71 | 70 |
72 #endif // CHROME_BROWSER_NET_CHROME_NET_LOG_H_ | 71 #endif // CHROME_BROWSER_NET_CHROME_NET_LOG_H_ |
OLD | NEW |