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

Side by Side Diff: net/base/capturing_net_log.h

Issue 10399083: Make NetLog take in callbacks that return Values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Update comments Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_BASE_CAPTURING_NET_LOG_H_ 5 #ifndef NET_BASE_CAPTURING_NET_LOG_H_
6 #define NET_BASE_CAPTURING_NET_LOG_H_ 6 #define NET_BASE_CAPTURING_NET_LOG_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 virtual ~CapturingNetLog(); 76 virtual ~CapturingNetLog();
77 77
78 // Returns the list of all entries in the log. 78 // Returns the list of all entries in the log.
79 void GetEntries(CapturedEntryList* entry_list) const; 79 void GetEntries(CapturedEntryList* entry_list) const;
80 80
81 void Clear(); 81 void Clear();
82 82
83 void SetLogLevel(NetLog::LogLevel log_level); 83 void SetLogLevel(NetLog::LogLevel log_level);
84 84
85 // NetLog implementation: 85 // NetLog implementation:
86 virtual void AddEntry( 86 virtual void OnAddEntry(const net::NetLog::Entry& entry) OVERRIDE;
87 EventType type,
88 const Source& source,
89 EventPhase phase,
90 const scoped_refptr<EventParameters>& extra_parameters) OVERRIDE;
91 virtual uint32 NextID() OVERRIDE; 87 virtual uint32 NextID() OVERRIDE;
92 virtual LogLevel GetLogLevel() const OVERRIDE; 88 virtual LogLevel GetLogLevel() const OVERRIDE;
93 virtual void AddThreadSafeObserver(ThreadSafeObserver* observer, 89 virtual void AddThreadSafeObserver(ThreadSafeObserver* observer,
94 LogLevel log_level) OVERRIDE; 90 LogLevel log_level) OVERRIDE;
95 virtual void SetObserverLogLevel(ThreadSafeObserver* observer, 91 virtual void SetObserverLogLevel(ThreadSafeObserver* observer,
96 LogLevel log_level) OVERRIDE; 92 LogLevel log_level) OVERRIDE;
97 virtual void RemoveThreadSafeObserver(ThreadSafeObserver* observer) OVERRIDE; 93 virtual void RemoveThreadSafeObserver(ThreadSafeObserver* observer) OVERRIDE;
98 94
99 private: 95 private:
100 // Needs to be "mutable" so can use it in GetEntries(). 96 // Needs to be "mutable" so can use it in GetEntries().
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 private: 132 private:
137 CapturingNetLog capturing_net_log_; 133 CapturingNetLog capturing_net_log_;
138 const BoundNetLog net_log_; 134 const BoundNetLog net_log_;
139 135
140 DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog); 136 DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog);
141 }; 137 };
142 138
143 } // namespace net 139 } // namespace net
144 140
145 #endif // NET_BASE_CAPTURING_NET_LOG_H_ 141 #endif // NET_BASE_CAPTURING_NET_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698