diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-13 13:55:10 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-13 13:55:10 +0000 |
commit | 9319035b01befc8d59c9c1c7f9d83fbe15b0ba79 (patch) | |
tree | 4f871697a10d9e6b46630571edb298982b550d42 /chrome/browser/net/net_log_logger.h | |
parent | 0e6fd884e68670a70a857d092b79fb7e71bf3856 (diff) | |
download | chromium_src-9319035b01befc8d59c9c1c7f9d83fbe15b0ba79.zip chromium_src-9319035b01befc8d59c9c1c7f9d83fbe15b0ba79.tar.gz chromium_src-9319035b01befc8d59c9c1c7f9d83fbe15b0ba79.tar.bz2 |
Redirects NetLog output to the log file, when the command line
option "--log-net-log" is used.
BUG= 50987
TEST= Run "chrome --log-net-log --enable-logging --log-level=0"
And then check to make sure the log contains the NetLog events.
Review URL: http://codereview.chromium.org/3040051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56021 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/net_log_logger.h')
-rw-r--r-- | chrome/browser/net/net_log_logger.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/chrome/browser/net/net_log_logger.h b/chrome/browser/net/net_log_logger.h new file mode 100644 index 0000000..98c989e --- /dev/null +++ b/chrome/browser/net/net_log_logger.h @@ -0,0 +1,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 +// LOG(INFO). 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_ + |