Commit fb1e5765 authored by achuith@chromium.org's avatar achuith@chromium.org

Replace NewRunnableFunction with Callback in ChromeResourceDispatcherHostDelegate.

BUG=chromium-os:22024
TEST=tests pass.
Review URL: http://codereview.chromium.org/8393040

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107442 0039d316-1c4b-4281-b951-d872f2087c98
parent 9c167954
...@@ -123,11 +123,11 @@ bool ChromeResourceDispatcherHostDelegate::ShouldBeginRequest( ...@@ -123,11 +123,11 @@ bool ChromeResourceDispatcherHostDelegate::ShouldBeginRequest(
if (request_data.resource_type == ResourceType::PRERENDER) { if (request_data.resource_type == ResourceType::PRERENDER) {
if (prerender::PrerenderManager::IsPrerenderingPossible()) { if (prerender::PrerenderManager::IsPrerenderingPossible()) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableFunction(AddPrerenderOnUI, base::Bind(&AddPrerenderOnUI,
child_id, child_id,
route_id, route_id,
request_data.url, request_data.url,
referrer)); referrer));
} }
// Prerendering or not, this request should be aborted. // Prerendering or not, this request should be aborted.
return false; return false;
...@@ -192,7 +192,7 @@ ResourceHandler* ChromeResourceDispatcherHostDelegate::DownloadStarting( ...@@ -192,7 +192,7 @@ ResourceHandler* ChromeResourceDispatcherHostDelegate::DownloadStarting(
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE, BrowserThread::UI, FROM_HERE,
NewRunnableFunction(&NotifyDownloadInitiatedOnUI, child_id, route_id)); base::Bind(&NotifyDownloadInitiatedOnUI, child_id, route_id));
// If this isn't a new request, we've seen this before and added the safe // If this isn't a new request, we've seen this before and added the safe
// browsing resource handler already so no need to add it again. This code // browsing resource handler already so no need to add it again. This code
...@@ -284,8 +284,7 @@ void ChromeResourceDispatcherHostDelegate::HandleExternalProtocol( ...@@ -284,8 +284,7 @@ void ChromeResourceDispatcherHostDelegate::HandleExternalProtocol(
const GURL& url, int child_id, int route_id) { const GURL& url, int child_id, int route_id) {
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE, BrowserThread::UI, FROM_HERE,
NewRunnableFunction( base::Bind(&ExternalProtocolHandler::LaunchUrl, url, child_id, route_id));
&ExternalProtocolHandler::LaunchUrl, url, child_id, route_id));
} }
#if defined(ENABLE_SAFE_BROWSING) #if defined(ENABLE_SAFE_BROWSING)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment