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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 8604010: base::Bind() conversion for BrowserProcessImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index b11de3d6e5edf7f1fee726fcceb093148307d24e..77e2d90d02b79c3ceea32d58ce937a3573e08078 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -8,11 +8,12 @@
#include <set>
#include <vector>
+#include "base/bind.h"
+#include "base/bind_helpers.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/synchronization/waitable_event.h"
-#include "base/task.h"
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/automation/automation_provider_list.h"
@@ -214,7 +215,7 @@ BrowserProcessImpl::~BrowserProcessImpl() {
// but we have some URLFetchers using the DefaultRequestContext, so they need
// to be cancelled too. Remove this when DefaultRequestContext goes away.
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
- NewRunnableFunction(&content::URLFetcher::CancelAll));
+ base::Bind(&content::URLFetcher::CancelAll));
// Need to clear profiles (download managers) before the io_thread_.
profile_manager_.reset();
@@ -324,12 +325,13 @@ unsigned int BrowserProcessImpl::ReleaseModule() {
CHECK(!BrowserList::GetLastActive());
io_thread()->message_loop()->PostTask(
FROM_HERE,
- NewRunnableFunction(&base::ThreadRestrictions::SetIOAllowed, true));
+ base::IgnoreReturn<bool>(
willchan no longer on Chromium 2011/11/19 20:58:24 I'm not sure if the template parameter is necessar
dcheng 2011/11/19 21:15:24 It seems to be necessary in general... except in t
willchan no longer on Chromium 2011/11/19 21:17:55 Can you show me the compilation errors you encount
dcheng 2011/11/19 21:21:27 CXX(target) out/Debug/obj.target/browser/chrome/br
+ base::Bind(&base::ThreadRestrictions::SetIOAllowed, true)));
#if defined(OS_MACOSX)
MessageLoop::current()->PostTask(
FROM_HERE,
- NewRunnableFunction(ChromeBrowserMainPartsMac::DidEndMainMessageLoop));
+ base::Bind(ChromeBrowserMainPartsMac::DidEndMainMessageLoop));
#endif
MessageLoop::current()->Quit();
}
@@ -360,7 +362,7 @@ void BrowserProcessImpl::EndSession() {
scoped_ptr<base::WaitableEvent> done_writing(
new base::WaitableEvent(false, false));
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
- NewRunnableFunction(Signal, done_writing.get()));
+ base::Bind(Signal, done_writing.get()));
// If all file writes haven't cleared in the timeout, leak the WaitableEvent
// so that there's no race to reference it in Signal().
if (!done_writing->TimedWait(
@@ -369,7 +371,7 @@ void BrowserProcessImpl::EndSession() {
#elif defined(OS_WIN)
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
- NewRunnableFunction(PostQuit, MessageLoop::current()));
+ base::Bind(PostQuit, MessageLoop::current()));
int quits_received = 0;
do {
MessageLoop::current()->Run();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698