summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/net_log_logger.cc
diff options
context:
space:
mode:
authormmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-29 12:43:23 +0000
committermmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-29 12:43:23 +0000
commitd5cbd92ad951a1c2c24cafebab8bbf3d084b1378 (patch)
tree2c48c137de27922fe1da18620568c4d442ddbe2c /chrome/browser/net/net_log_logger.cc
parent679a319c1fbb027fff52dee50a381ea054092b00 (diff)
downloadchromium_src-d5cbd92ad951a1c2c24cafebab8bbf3d084b1378.zip
chromium_src-d5cbd92ad951a1c2c24cafebab8bbf3d084b1378.tar.gz
chromium_src-d5cbd92ad951a1c2c24cafebab8bbf3d084b1378.tar.bz2
Remove the ChromeNetLog observer classes, using NetLog::ThreadSafeObserver
instead, slightly modifying the NetLog interface to do so. R=eroman@chromium.org BUG=114611 Review URL: http://codereview.chromium.org/9415013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/net_log_logger.cc')
-rw-r--r--chrome/browser/net/net_log_logger.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/net/net_log_logger.cc b/chrome/browser/net/net_log_logger.cc
index c52abf7..bc9cd6a 100644
--- a/chrome/browser/net/net_log_logger.cc
+++ b/chrome/browser/net/net_log_logger.cc
@@ -8,13 +8,13 @@
#include "base/file_util.h"
#include "base/json/json_writer.h"
+#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread_restrictions.h"
#include "base/values.h"
#include "chrome/browser/ui/webui/net_internals/net_internals_ui.h"
-NetLogLogger::NetLogLogger(const FilePath &log_path)
- : ThreadSafeObserverImpl(net::NetLog::LOG_ALL_BUT_BYTES) {
+NetLogLogger::NetLogLogger(const FilePath &log_path) {
if (!log_path.empty()) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
file_.Set(file_util::OpenFile(log_path, "w"));
@@ -33,6 +33,10 @@ NetLogLogger::NetLogLogger(const FilePath &log_path)
NetLogLogger::~NetLogLogger() {
}
+void NetLogLogger::StartObserving(net::NetLog* net_log) {
+ net_log->AddThreadSafeObserver(this, net::NetLog::LOG_ALL_BUT_BYTES);
+}
+
void NetLogLogger::OnAddEntry(net::NetLog::EventType type,
const base::TimeTicks& time,
const net::NetLog::Source& source,