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

Unified Diff: net/log/file_net_log_observer.h

Issue 2973673003: Use FileNetLogObserver for implementing --log-net-log. (Closed)
Patch Set: address comments Created 3 years, 5 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 | « components/net_log/net_export_file_writer.cc ('k') | net/log/file_net_log_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/file_net_log_observer.h
diff --git a/net/log/file_net_log_observer.h b/net/log/file_net_log_observer.h
index 529c1f422ab3ce392450a71372ecd69db59ad1af..fc1fd8af3217190d00c55b828bd2bddb25190a94 100644
--- a/net/log/file_net_log_observer.h
+++ b/net/log/file_net_log_observer.h
@@ -42,9 +42,7 @@ class NetLogCaptureMode;
// large this file can grow; all events added will be written to the file.
//
// The consumer must call StartObserving before calling StopObserving, and must
-// call each method exactly once in the lifetime of the observer. StartObserving
-// and StopObserving must be called on the same thread, but there is no
-// restriction on which thread is used.
+// call each method exactly once in the lifetime of the observer.
class NET_EXPORT FileNetLogObserver : public NetLog::ThreadSafeObserver {
public:
// Creates a FileNetLogObserver in bounded mode.
@@ -90,11 +88,11 @@ class NET_EXPORT FileNetLogObserver : public NetLog::ThreadSafeObserver {
// |polled_data| is an optional argument used to add additional network stack
// state to the log.
//
- // |callback| will be run on whichever thread StopObserving() was called on
- // once all file writing is complete and the netlog files can be accessed
- // safely.
+ // If non-null, |optional_callback| will be run on whichever thread
+ // StopObserving() was called on once all file writing is complete and the
+ // netlog files can be accessed safely.
void StopObserving(std::unique_ptr<base::Value> polled_data,
- const base::Closure& callback);
+ base::OnceClosure optional_callback);
// NetLog::ThreadSafeObserver
void OnAddEntry(const NetLogEntry& entry) override;
« no previous file with comments | « components/net_log/net_export_file_writer.cc ('k') | net/log/file_net_log_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698