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

Unified Diff: trunk/src/base/message_loop/message_pump_io_ios.h

Issue 19737005: Revert 212948 "Made MessagePump a non-thread safe class." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 | « trunk/src/base/message_loop/message_pump_gtk.cc ('k') | trunk/src/base/message_loop/message_pump_io_ios.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/base/message_loop/message_pump_io_ios.h
===================================================================
--- trunk/src/base/message_loop/message_pump_io_ios.h (revision 212951)
+++ trunk/src/base/message_loop/message_pump_io_ios.h (working copy)
@@ -9,7 +9,6 @@
#include "base/mac/scoped_cffiledescriptorref.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_pump_mac.h"
#include "base/observer_list.h"
@@ -71,8 +70,8 @@
CFRunLoopSourceRef fd_source,
bool is_persistent);
- void set_pump(base::WeakPtr<MessagePumpIOSForIO> pump) { pump_ = pump; }
- const base::WeakPtr<MessagePumpIOSForIO>& pump() const { return pump_; }
+ void set_pump(MessagePumpIOSForIO* pump) { pump_ = pump; }
+ MessagePumpIOSForIO* pump() const { return pump_; }
void set_watcher(Watcher* watcher) { watcher_ = watcher; }
@@ -83,7 +82,7 @@
base::mac::ScopedCFFileDescriptorRef fdref_;
CFOptionFlags callback_types_;
base::ScopedCFTypeRef<CFRunLoopSourceRef> fd_source_;
- base::WeakPtr<MessagePumpIOSForIO> pump_;
+ scoped_refptr<MessagePumpIOSForIO> pump_;
Watcher* watcher_;
DISALLOW_COPY_AND_ASSIGN(FileDescriptorWatcher);
@@ -96,7 +95,6 @@
};
MessagePumpIOSForIO();
- virtual ~MessagePumpIOSForIO();
// Have the current thread's message loop watch for a a situation in which
// reading/writing to the FD can be performed without blocking.
@@ -120,6 +118,9 @@
void AddIOObserver(IOObserver* obs);
void RemoveIOObserver(IOObserver* obs);
+ protected:
+ virtual ~MessagePumpIOSForIO();
+
private:
friend class MessagePumpIOSForIOTest;
@@ -133,8 +134,6 @@
ObserverList<IOObserver> io_observers_;
ThreadChecker watch_file_descriptor_caller_checker_;
- base::WeakPtrFactory<MessagePumpIOSForIO> weak_factory_;
-
DISALLOW_COPY_AND_ASSIGN(MessagePumpIOSForIO);
};
« no previous file with comments | « trunk/src/base/message_loop/message_pump_gtk.cc ('k') | trunk/src/base/message_loop/message_pump_io_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698