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

Side by Side Diff: base/message_loop.cc

Issue 9022034: Convert various ReleaseSoon methods to use base::Bind() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test Created 8 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/message_loop.h ('k') | base/message_loop_helpers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/message_loop.h" 5 #include "base/message_loop.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 769
770 return false; 770 return false;
771 } 771 }
772 772
773 void MessageLoop::DeleteSoonInternal(const tracked_objects::Location& from_here, 773 void MessageLoop::DeleteSoonInternal(const tracked_objects::Location& from_here,
774 void(*deleter)(const void*), 774 void(*deleter)(const void*),
775 const void* object) { 775 const void* object) {
776 PostNonNestableTask(from_here, base::Bind(deleter, object)); 776 PostNonNestableTask(from_here, base::Bind(deleter, object));
777 } 777 }
778 778
779 void MessageLoop::ReleaseSoonInternal(
780 const tracked_objects::Location& from_here,
781 void(*releaser)(const void*),
782 const void* object) {
783 PostNonNestableTask(from_here, base::Bind(releaser, object));
784 }
785
779 //------------------------------------------------------------------------------ 786 //------------------------------------------------------------------------------
780 // MessageLoop::AutoRunState 787 // MessageLoop::AutoRunState
781 788
782 MessageLoop::AutoRunState::AutoRunState(MessageLoop* loop) : loop_(loop) { 789 MessageLoop::AutoRunState::AutoRunState(MessageLoop* loop) : loop_(loop) {
783 // Make the loop reference us. 790 // Make the loop reference us.
784 previous_state_ = loop_->state_; 791 previous_state_ = loop_->state_;
785 if (previous_state_) { 792 if (previous_state_) {
786 run_depth = previous_state_->run_depth + 1; 793 run_depth = previous_state_->run_depth + 1;
787 } else { 794 } else {
788 run_depth = 1; 795 run_depth = 1;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 Watcher *delegate) { 869 Watcher *delegate) {
863 return pump_libevent()->WatchFileDescriptor( 870 return pump_libevent()->WatchFileDescriptor(
864 fd, 871 fd,
865 persistent, 872 persistent,
866 static_cast<base::MessagePumpLibevent::Mode>(mode), 873 static_cast<base::MessagePumpLibevent::Mode>(mode),
867 controller, 874 controller,
868 delegate); 875 delegate);
869 } 876 }
870 877
871 #endif 878 #endif
OLDNEW
« no previous file with comments | « base/message_loop.h ('k') | base/message_loop_helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698