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

Unified Diff: base/message_loop/message_loop.h

Issue 185413019: Used scoped_ptr in InitMessagePumpForUIFactory and CreateMessagePumpForType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes in accordance to build fail for linux chromeos Created 6 years, 9 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 | « AUTHORS ('k') | base/message_loop/message_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.h
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 956f5f088c8cb6d84aaed12b763016b6bccca305..400a5eccc903004b79108782cd03ef39020f840f 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -154,7 +154,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
static void EnableHistogrammer(bool enable_histogrammer);
- typedef MessagePump* (MessagePumpFactory)();
+ typedef scoped_ptr<MessagePump> (MessagePumpFactory)();
// Uses the given base::MessagePumpForUIFactory to override the default
// MessagePump implementation for 'TYPE_UI'. Returns true if the factory
// was successfully registered.
@@ -162,10 +162,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// Creates the default MessagePump based on |type|. Caller owns return
// value.
- // TODO(sky): convert this and InitMessagePumpForUIFactory() to return a
- // scoped_ptr.
- static MessagePump* CreateMessagePumpForType(Type type);
-
+ static scoped_ptr<MessagePump> CreateMessagePumpForType(Type type);
// A DestructionObserver is notified when the current MessageLoop is being
// destroyed. These observers are notified prior to MessageLoop::current()
// being changed to return NULL. This gives interested parties the chance to
« no previous file with comments | « AUTHORS ('k') | base/message_loop/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698