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

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: Move friend declaration 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
Index: net/base/capturing_net_log.h
===================================================================
--- net/base/capturing_net_log.h (revision 126703)
+++ net/base/capturing_net_log.h (working copy)
@@ -57,11 +57,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,15 +92,16 @@
// 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());
+ // The source type doesn't matter, since we only use |this| for a single
+ // source, and pull the results directly from |this|.
+ return BoundNetLog::Make(capturing_net_log_.get(),
+ net::NetLog::SOURCE_NONE);
eroman 2012/03/14 21:53:48 I think we should preserve the Source for generali
mmenke 2012/03/14 22:25:23 Ahh, good point. Done.
}
// Fills |entry_list| with all entries in the log.
@@ -112,7 +113,6 @@
void SetLogLevel(NetLog::LogLevel log_level);
private:
- NetLog::Source source_;
scoped_ptr<CapturingNetLog> capturing_net_log_;
eroman 2012/03/14 21:53:48 Could make this into an instance now.
mmenke 2012/03/14 22:25:23 Done.
DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog);

Powered by Google App Engine
This is Rietveld 408576698