net_log_logger.h revision 513209b27ff55e2841eac0e4120199c23acce758
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
3// found in the LICENSE file.
4
5#ifndef CHROME_BROWSER_NET_NET_LOG_LOGGER_H_
6#define CHROME_BROWSER_NET_NET_LOG_LOGGER_H_
7#pragma once
8
9#include "chrome/browser/net/chrome_net_log.h"
10
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
13// about:net-internals page.
14class NetLogLogger : public ChromeNetLog::Observer {
15 public:
16  NetLogLogger();
17  ~NetLogLogger();
18
19  // Observer implementation:
20  virtual void OnAddEntry(net::NetLog::EventType type,
21                          const base::TimeTicks& time,
22                          const net::NetLog::Source& source,
23                          net::NetLog::EventPhase phase,
24                          net::NetLog::EventParameters* params);
25
26 private:
27  DISALLOW_COPY_AND_ASSIGN(NetLogLogger);
28};
29
30#endif  // CHROME_BROWSER_NET_NET_LOG_LOGGER_H_
31
32