summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/net_log_logger.h
blob: 7f90d942e605528318d18a1d411b9e040f1e02ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_NET_NET_LOG_LOGGER_H_
#define CHROME_BROWSER_NET_NET_LOG_LOGGER_H_
#pragma once

#include "chrome/browser/net/chrome_net_log.h"

// NetLogLogger watches the NetLog event stream, and sends all entries to
// VLOG(1).  This is to debug errors that prevent getting to the
// about:net-internals page.
class NetLogLogger : public ChromeNetLog::Observer {
 public:
  NetLogLogger();
  ~NetLogLogger();

  // Observer implementation:
  virtual void OnAddEntry(net::NetLog::EventType type,
                          const base::TimeTicks& time,
                          const net::NetLog::Source& source,
                          net::NetLog::EventPhase phase,
                          net::NetLog::EventParameters* params);

 private:
  DISALLOW_COPY_AND_ASSIGN(NetLogLogger);
};

#endif  // CHROME_BROWSER_NET_NET_LOG_LOGGER_H_