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

Unified Diff: net/base/file_stream_unittest.cc

Issue 10399083: Make NetLog take in callbacks that return Values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix merge error 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/capturing_net_log.cc ('k') | net/base/net_log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/file_stream_unittest.cc
===================================================================
--- net/base/file_stream_unittest.cc (revision 141317)
+++ net/base/file_stream_unittest.cc (working copy)
@@ -38,7 +38,7 @@
class NetLogForNotifyingFileClosure : public NetLog {
public:
NetLogForNotifyingFileClosure()
- : id_(0),
+ : last_id_(0),
on_closure_(false /* manual_reset */, false /* initially_signaled */) {
}
@@ -51,17 +51,12 @@
}
// NetLog overrides:
- virtual void AddEntry(
- EventType type,
- const Source& source,
- EventPhase phase,
- const scoped_refptr<EventParameters>& params) OVERRIDE {
- if (type == TYPE_FILE_STREAM_CLOSE) {
+ virtual void OnAddEntry(const net::NetLog::Entry& entry) OVERRIDE {
+ if (entry.type() == TYPE_FILE_STREAM_CLOSE)
on_closure_.Signal();
- }
}
- virtual uint32 NextID() OVERRIDE { return id_++; }
+ virtual uint32 NextID() OVERRIDE { return ++last_id_; }
virtual LogLevel GetLogLevel() const OVERRIDE { return LOG_ALL; }
virtual void AddThreadSafeObserver(ThreadSafeObserver* observer,
LogLevel log_level) OVERRIDE {
@@ -76,7 +71,7 @@
}
private:
- uint32 id_;
+ uint32 last_id_;
base::WaitableEvent on_closure_;
};
« no previous file with comments | « net/base/capturing_net_log.cc ('k') | net/base/net_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698