Only pump messages during a cookie query if it results in a user prompt.

Note: I left LocalStorage intact.  I want to first confirm that this CL
resolves the Intl2 performance regression.  If so, then I'll follow-up
with a CL to add similar treatment for LocalStorage.

R=jam
BUG=36310
TEST=none

Review URL: http://codereview.chromium.org/657074

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39908 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/renderer/render_thread.h b/chrome/renderer/render_thread.h
index 416b71b..fb99d74c 100644
--- a/chrome/renderer/render_thread.h
+++ b/chrome/renderer/render_thread.h
@@ -24,6 +24,7 @@
 #include "ipc/ipc_platform_file.h"
 
 class AppCacheDispatcher;
+class CookieMessageFilter;
 class DBMessageFilter;
 class DevToolsAgentFilter;
 class FilePath;
@@ -105,14 +106,6 @@
   virtual void WidgetHidden();
   virtual void WidgetRestored();
 
-  // Send a synchronous message and run a nested message loop, while waiting
-  // for a reply.
-  //
-  // NOTE: Only use this method if the handler for the message may need to show
-  // UI before replying.
-  //
-  bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message);
-
   // These methods modify how the next message is sent.  Normally, when sending
   // a synchronous message that runs a nested message loop, we need to suspend
   // callbacks into WebKit.  This involves disabling timers and deferring
@@ -137,6 +130,10 @@
     return spellchecker_.get();
   }
 
+  CookieMessageFilter* cookie_message_filter() const {
+    return cookie_message_filter_.get();
+  }
+
   bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; }
 
   bool is_extension_process() const { return is_extension_process_; }
@@ -240,6 +237,7 @@
 
   // Used on the renderer and IPC threads.
   scoped_refptr<DBMessageFilter> db_message_filter_;
+  scoped_refptr<CookieMessageFilter> cookie_message_filter_;
 
 #if defined(OS_POSIX)
   scoped_refptr<IPC::ChannelProxy::MessageFilter>