Used scoped_ptr

There was this TODO(sky): convert this and InitMessagePumpForUIFactory() to return a
scoped_ptr.

This patch is for doing the same.

R=darin@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/185413019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255643 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: eed3318eaa4bb5a8c252093c4d9881b4ef14de99
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 956f5f0..400a5ec 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -154,7 +154,7 @@
 
   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 @@
 
   // 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