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

Unified Diff: base/message_loop/message_pump_libevent.h

Issue 2695593009: Use the location where FileDescriptorWatcher is created to track the libevent handlers (Closed)
Patch Set: fix mac. Created 3 years, 10 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 | « base/message_loop/message_pump_io_ios_unittest.cc ('k') | base/message_loop/message_pump_libevent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_pump_libevent.h
diff --git a/base/message_loop/message_pump_libevent.h b/base/message_loop/message_pump_libevent.h
index 752dc929a04f3014869f0a66bc47faed52df3224..1124560d66c1c8ae910a7b86cf592477f85cdf7e 100644
--- a/base/message_loop/message_pump_libevent.h
+++ b/base/message_loop/message_pump_libevent.h
@@ -6,6 +6,7 @@
#define BASE_MESSAGE_LOOP_MESSAGE_PUMP_LIBEVENT_H_
#include "base/compiler_specific.h"
+#include "base/location.h"
#include "base/macros.h"
#include "base/message_loop/message_pump.h"
#include "base/threading/thread_checker.h"
@@ -37,7 +38,7 @@ class BASE_EXPORT MessagePumpLibevent : public MessagePump {
// Object returned by WatchFileDescriptor to manage further watching.
class FileDescriptorWatcher {
public:
- FileDescriptorWatcher();
+ explicit FileDescriptorWatcher(const tracked_objects::Location& from_here);
~FileDescriptorWatcher(); // Implicitly calls StopWatchingFileDescriptor.
// NOTE: These methods aren't called StartWatching()/StopWatching() to
@@ -47,6 +48,10 @@ class BASE_EXPORT MessagePumpLibevent : public MessagePump {
// to do.
bool StopWatchingFileDescriptor();
+ const tracked_objects::Location& created_from_location() {
+ return created_from_location_;
+ }
+
private:
friend class MessagePumpLibevent;
friend class MessagePumpLibeventTest;
@@ -73,6 +78,8 @@ class BASE_EXPORT MessagePumpLibevent : public MessagePump {
// destructor.
bool* was_destroyed_;
+ const tracked_objects::Location created_from_location_;
+
DISALLOW_COPY_AND_ASSIGN(FileDescriptorWatcher);
};
« no previous file with comments | « base/message_loop/message_pump_io_ios_unittest.cc ('k') | base/message_loop/message_pump_libevent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698