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

Unified Diff: net/log/capturing_net_log.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/http/http_network_transaction_unittest.cc ('k') | net/log/capturing_net_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/capturing_net_log.h
diff --git a/net/log/capturing_net_log.h b/net/log/capturing_net_log.h
deleted file mode 100644
index f2cc03f7bc620f4c760c67039a2f93313cee8616..0000000000000000000000000000000000000000
--- a/net/log/capturing_net_log.h
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2012 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_CAPTURING_NET_LOG_H_
-#define NET_LOG_CAPTURING_NET_LOG_H_
-
-#include <string>
-#include <vector>
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "net/log/captured_net_log_entry.h"
-#include "net/log/capturing_net_log_observer.h"
-#include "net/log/net_log.h"
-
-namespace net {
-
-// CapturingNetLog is convenience class which combines a NetLog and a
-// CapturingNetLogObserver. It is intended for testing only, and is part of the
-// net_test_support project.
-class CapturingNetLog : public NetLog {
- public:
- // TODO(mmenke): Get rid of these.
- typedef CapturedNetLogEntry CapturedEntry;
- typedef CapturedNetLogEntry::List CapturedEntryList;
-
- CapturingNetLog();
- ~CapturingNetLog() override;
-
- void SetLogLevel(LogLevel log_level);
-
- // Below methods are forwarded to capturing_net_log_observer_.
- void GetEntries(CapturedEntryList* entry_list) const;
- void GetEntriesForSource(Source source, CapturedEntryList* entry_list) const;
- size_t GetSize() const;
- void Clear();
-
- private:
- CapturingNetLogObserver capturing_net_log_observer_;
-
- DISALLOW_COPY_AND_ASSIGN(CapturingNetLog);
-};
-
-// Helper class that exposes a similar API as BoundNetLog, but uses a
-// CapturingNetLog rather than the more generic NetLog.
-//
-// A CapturingBoundNetLog can easily be converted to a BoundNetLog using the
-// bound() method.
-class CapturingBoundNetLog {
- public:
- CapturingBoundNetLog();
- ~CapturingBoundNetLog();
-
- // The returned BoundNetLog is only valid while |this| is alive.
- BoundNetLog bound() const { return net_log_; }
-
- // Fills |entry_list| with all entries in the log.
- void GetEntries(CapturingNetLog::CapturedEntryList* entry_list) const;
-
- // Fills |entry_list| with all entries in the log from the specified Source.
- void GetEntriesForSource(
- NetLog::Source source,
- CapturingNetLog::CapturedEntryList* entry_list) const;
-
- // Returns number of entries in the log.
- size_t GetSize() const;
-
- void Clear();
-
- // Sets the log level of the underlying CapturingNetLog.
- void SetLogLevel(NetLog::LogLevel log_level);
-
- private:
- CapturingNetLog capturing_net_log_;
- const BoundNetLog net_log_;
-
- DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog);
-};
-
-} // namespace net
-
-#endif // NET_LOG_CAPTURING_NET_LOG_H_
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/log/capturing_net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698