Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1310)

Unified Diff: net/log/net_log_logger.h

Issue 1084533002: Rename NetLogLogger and CapturingNetLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename NetLogLogger and CapturingNetLog(removed compiler error for chromeOS) Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/log/capturing_net_log.cc ('k') | net/log/net_log_logger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/net_log_logger.h
diff --git a/net/log/net_log_logger.h b/net/log/net_log_logger.h
deleted file mode 100644
index 111d8ddd60a120c583c6a49ef27a1d6322f1b06c..0000000000000000000000000000000000000000
--- a/net/log/net_log_logger.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2013 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 NET_LOG_NET_LOG_LOGGER_H_
-#define NET_LOG_NET_LOG_LOGGER_H_
-
-#include <stdio.h>
-
-#include "base/files/scoped_file.h"
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "net/log/net_log.h"
-
-namespace base {
-class DictionaryValue;
-class FilePath;
-class Value;
-}
-
-namespace net {
-
-class URLRequestContext;
-
-// NetLogLogger watches the NetLog event stream, and sends all entries to
-// a file specified on creation.
-//
-// The text file will contain a single JSON object.
-class NET_EXPORT NetLogLogger : public NetLog::ThreadSafeObserver {
- public:
- NetLogLogger();
- ~NetLogLogger() override;
-
- // Sets the log level to log at. Must be called before StartObserving.
- void set_log_level(NetLog::LogLevel log_level);
-
- // Starts observing |net_log| and writes output to |file|. Must not already
- // be watching a NetLog. Separate from constructor to enforce thread safety.
- //
- // |file| must be a non-NULL empty file that's open for writing.
- //
- // |constants| is an optional legend for decoding constant values used in the
- // log. It should generally be a modified version of GetNetConstants(). If
- // not present, the output of GetNetConstants() will be used.
- //
- // |url_request_context| is an optional URLRequestContext that will be used to
- // pre-populate the log with information about in-progress events.
- // If the context is non-NULL, this must be called on the context's thread.
- void StartObserving(NetLog* net_log,
- base::ScopedFILE file,
- base::Value* constants,
- net::URLRequestContext* url_request_context);
-
- // Stops observing net_log(). Must already be watching. Must be called
- // before destruction of the NetLogLogger and the NetLog.
- //
- // |url_request_context| is an optional argument used to added additional
- // network stack state to the log. If the context is non-NULL, this must be
- // called on the context's thread.
- void StopObserving(net::URLRequestContext* url_request_context);
-
- // net::NetLog::ThreadSafeObserver implementation:
- void OnAddEntry(const NetLog::Entry& entry) override;
-
- private:
- base::ScopedFILE file_;
-
- // The LogLevel to log at.
- NetLog::LogLevel log_level_;
-
- // True if OnAddEntry() has been called at least once.
- bool added_events_;
-
- DISALLOW_COPY_AND_ASSIGN(NetLogLogger);
-};
-
-} // namespace net
-
-#endif // NET_LOG_NET_LOG_LOGGER_H_
« no previous file with comments | « net/log/capturing_net_log.cc ('k') | net/log/net_log_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698