| 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_NET_LOG_LOGGER_H_ | 5 #ifndef CHROME_BROWSER_NET_NET_LOG_LOGGER_H_ |
| 6 #define CHROME_BROWSER_NET_NET_LOG_LOGGER_H_ | 6 #define CHROME_BROWSER_NET_NET_LOG_LOGGER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/net/chrome_net_log.h" | 9 #include "chrome/browser/net/chrome_net_log.h" |
| 10 | 10 |
| 11 // NetLogLogger watches the NetLog event stream, and sends all entries to | 11 // NetLogLogger watches the NetLog event stream, and sends all entries to |
| 12 // VLOG(1). This is to debug errors that prevent getting to the | 12 // VLOG(1). This is to debug errors that prevent getting to the |
| 13 // about:net-internals page. | 13 // about:net-internals page. |
| 14 class NetLogLogger : public ChromeNetLog::Observer { | 14 class NetLogLogger : public ChromeNetLog::ThreadSafeObserver { |
| 15 public: | 15 public: |
| 16 NetLogLogger(); | 16 NetLogLogger(); |
| 17 ~NetLogLogger(); | 17 ~NetLogLogger(); |
| 18 | 18 |
| 19 // Observer implementation: | 19 // ThreadSafeObserver implementation: |
| 20 virtual void OnAddEntry(net::NetLog::EventType type, | 20 virtual void OnAddEntry(net::NetLog::EventType type, |
| 21 const base::TimeTicks& time, | 21 const base::TimeTicks& time, |
| 22 const net::NetLog::Source& source, | 22 const net::NetLog::Source& source, |
| 23 net::NetLog::EventPhase phase, | 23 net::NetLog::EventPhase phase, |
| 24 net::NetLog::EventParameters* params); | 24 net::NetLog::EventParameters* params); |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 DISALLOW_COPY_AND_ASSIGN(NetLogLogger); | 27 DISALLOW_COPY_AND_ASSIGN(NetLogLogger); |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 #endif // CHROME_BROWSER_NET_NET_LOG_LOGGER_H_ | 30 #endif // CHROME_BROWSER_NET_NET_LOG_LOGGER_H_ |
| 31 | 31 |
| OLD | NEW |