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

Unified Diff: net/base/capturing_net_log.h

Issue 9585026: Add a source id to global NetLog entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Missed one Created 8 years, 9 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 | « chrome/browser/resources/net_internals/source_tracker.js ('k') | net/base/capturing_net_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/capturing_net_log.h
===================================================================
--- net/base/capturing_net_log.h (revision 126769)
+++ net/base/capturing_net_log.h (working copy)
@@ -12,7 +12,6 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "base/time.h"
#include "net/base/net_export.h"
@@ -57,11 +56,11 @@
void SetLogLevel(NetLog::LogLevel log_level);
// NetLog implementation:
- virtual void AddEntry(EventType type,
- const base::TimeTicks& time,
- const Source& source,
- EventPhase phase,
- EventParameters* extra_parameters) OVERRIDE;
+ virtual void AddEntry(
+ EventType type,
+ const Source& source,
+ EventPhase phase,
+ const scoped_refptr<EventParameters>& extra_parameters) OVERRIDE;
virtual uint32 NextID() OVERRIDE;
virtual LogLevel GetLogLevel() const OVERRIDE;
virtual void AddThreadSafeObserver(ThreadSafeObserver* observer,
@@ -92,16 +91,12 @@
// bound() method.
class NET_EXPORT_PRIVATE CapturingBoundNetLog {
public:
- CapturingBoundNetLog(const NetLog::Source& source, CapturingNetLog* net_log);
-
explicit CapturingBoundNetLog(size_t max_num_entries);
~CapturingBoundNetLog();
// The returned BoundNetLog is only valid while |this| is alive.
- BoundNetLog bound() const {
- return BoundNetLog(source_, capturing_net_log_.get());
- }
+ BoundNetLog bound() const { return net_log_; }
// Fills |entry_list| with all entries in the log.
void GetEntries(CapturingNetLog::EntryList* entry_list) const;
@@ -112,8 +107,8 @@
void SetLogLevel(NetLog::LogLevel log_level);
private:
- NetLog::Source source_;
- scoped_ptr<CapturingNetLog> capturing_net_log_;
+ CapturingNetLog capturing_net_log_;
+ const BoundNetLog net_log_;
DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog);
};
« no previous file with comments | « chrome/browser/resources/net_internals/source_tracker.js ('k') | net/base/capturing_net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698