diff options
-rw-r--r-- | base/observer_list_threadsafe.h | 3 | ||||
-rw-r--r-- | base/observer_list_unittest.cc | 4 | ||||
-rw-r--r-- | base/task.h | 3 | ||||
-rw-r--r-- | base/tracked_objects.cc | 4 | ||||
-rw-r--r-- | base/weak_ptr_unittest.cc | 3 | ||||
-rw-r--r-- | chrome/browser/browser.cc | 15 | ||||
-rw-r--r-- | chrome/browser/chromeos/notifications/balloon_view.cc | 3 |
7 files changed, 20 insertions, 15 deletions
diff --git a/base/observer_list_threadsafe.h b/base/observer_list_threadsafe.h index ce30ce0..d0151f4 100644 --- a/base/observer_list_threadsafe.h +++ b/base/observer_list_threadsafe.h @@ -137,7 +137,8 @@ class ObserverListThreadSafe for (it = observer_lists_.begin(); it != observer_lists_.end(); ++it) { MessageLoop* loop = (*it).first; ObserverList<ObserverType>* list = (*it).second; - loop->PostTask(FROM_HERE, + loop->PostTask( + FROM_HERE, NewRunnableMethod(this, &ObserverListThreadSafe<ObserverType>:: template NotifyWrapper<Method, Params>, list, method)); diff --git a/base/observer_list_unittest.cc b/base/observer_list_unittest.cc index 3f5ff0a..79af96a 100644 --- a/base/observer_list_unittest.cc +++ b/base/observer_list_unittest.cc @@ -107,8 +107,8 @@ class AddRemoveThread : public PlatformThread::Delegate, void ThreadMain() { loop_ = new MessageLoop(); // Fire up a message loop. - loop_->PostTask(FROM_HERE, - factory_->NewRunnableMethod(&AddRemoveThread::AddTask)); + loop_->PostTask( + FROM_HERE, factory_->NewRunnableMethod(&AddRemoveThread::AddTask)); loop_->Run(); //LOG(ERROR) << "Loop 0x" << std::hex << loop_ << " done. " << // count_observes_ << ", " << count_addtask_; diff --git a/base/task.h b/base/task.h index cbb8c99..de5da77 100644 --- a/base/task.h +++ b/base/task.h @@ -66,7 +66,8 @@ class CancelableTask : public Task { // // // The factories are not thread safe, so always invoke on // // |MessageLoop::current()|. -// MessageLoop::current()->PostDelayedTask(FROM_HERE, +// MessageLoop::current()->PostDelayedTask( +// FROM_HERE, // some_method_factory_.NewRunnableMethod(&MyClass::SomeMethod), // kSomeMethodDelayMS); // } diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc index bc259a2..3085816 100644 --- a/base/tracked_objects.cc +++ b/base/tracked_objects.cc @@ -352,8 +352,8 @@ void ThreadData::RunOnAllThreads(void (*function)()) { HANDLE completion_handle = CreateEvent(NULL, false, false, NULL); // Tell all other threads to run. for (size_t i = 0; i < message_loops.size(); ++i) - message_loops[i]->PostTask(FROM_HERE, - new RunTheStatic(function, completion_handle, counter)); + message_loops[i]->PostTask( + FROM_HERE, new RunTheStatic(function, completion_handle, counter)); // Also run Task on our thread. RunTheStatic local_task(function, completion_handle, counter); diff --git a/base/weak_ptr_unittest.cc b/base/weak_ptr_unittest.cc index 6d38caa..df79606d 100644 --- a/base/weak_ptr_unittest.cc +++ b/base/weak_ptr_unittest.cc @@ -17,7 +17,8 @@ class OffThreadObjectCreator { { Thread creator_thread("creator_thread"); creator_thread.Start(); - creator_thread.message_loop()->PostTask(FROM_HERE, + creator_thread.message_loop()->PostTask( + FROM_HERE, NewRunnableFunction(OffThreadObjectCreator::CreateObject, &result)); } DCHECK(result); // We synchronized on thread destruction above. diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index aa12efc..4810c3c0 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1776,8 +1776,8 @@ void Browser::CloseFrameAfterDragSession() { // otherwise the frame will think the drag session is still active and ignore // the request. // TODO(port): figure out what is required here in a cross-platform world - MessageLoop::current()->PostTask(FROM_HERE, - method_factory_.NewRunnableMethod(&Browser::CloseFrame)); + MessageLoop::current()->PostTask( + FROM_HERE, method_factory_.NewRunnableMethod(&Browser::CloseFrame)); #endif } @@ -1962,8 +1962,8 @@ void Browser::TabStripEmpty() { // still present. // NOTE: If you change to be immediate (no invokeLater) then you'll need to // update BrowserList::CloseAllBrowsers. - MessageLoop::current()->PostTask(FROM_HERE, - method_factory_.NewRunnableMethod(&Browser::CloseFrame)); + MessageLoop::current()->PostTask( + FROM_HERE, method_factory_.NewRunnableMethod(&Browser::CloseFrame)); } /////////////////////////////////////////////////////////////////////////////// @@ -2371,7 +2371,8 @@ void Browser::Observe(NotificationType type, if (is_attempting_to_close_browser_) { // Need to do this asynchronously as it will close the tab, which is // currently on the call stack above us. - MessageLoop::current()->PostTask(FROM_HERE, + MessageLoop::current()->PostTask( + FROM_HERE, method_factory_.NewRunnableMethod(&Browser::ClearUnloadState, Source<TabContents>(source).ptr())); } @@ -2777,7 +2778,8 @@ void Browser::ScheduleUIUpdate(const TabContents* source, if (chrome_updater_factory_.empty()) { // No task currently scheduled, start another. - MessageLoop::current()->PostDelayedTask(FROM_HERE, + MessageLoop::current()->PostDelayedTask( + FROM_HERE, chrome_updater_factory_.NewRunnableMethod( &Browser::ProcessPendingUIUpdates), kUIUpdateCoalescingTimeMS); @@ -3280,4 +3282,3 @@ void Browser::SetAppExtensionById(TabContents* contents, contents->SetAppExtension(extension); } } - diff --git a/chrome/browser/chromeos/notifications/balloon_view.cc b/chrome/browser/chromeos/notifications/balloon_view.cc index 489ac49..f8b5a04 100644 --- a/chrome/browser/chromeos/notifications/balloon_view.cc +++ b/chrome/browser/chromeos/notifications/balloon_view.cc @@ -105,7 +105,8 @@ void BalloonViewImpl::Show(Balloon* balloon) { } void BalloonViewImpl::Close(bool by_user) { - MessageLoop::current()->PostTask(FROM_HERE, + MessageLoop::current()->PostTask( + FROM_HERE, method_factory_.NewRunnableMethod( &BalloonViewImpl::DelayedClose, by_user)); } |