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

Side by Side Diff: base/message_loop_proxy_unittest.cc

Issue 11794032: base: Update the calls from MessageLoop::Quit() to QuitWhenIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/file_util_proxy_unittest.cc ('k') | base/message_loop_unittest.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_proxy.h" 5 #include "base/message_loop_proxy.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/debug/leak_annotations.h" 9 #include "base/debug/leak_annotations.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 MessageLoop** deleted_on_; 77 MessageLoop** deleted_on_;
78 int* destruct_order_; 78 int* destruct_order_;
79 }; 79 };
80 80
81 static void RecordLoop(scoped_refptr<LoopRecorder> recorder) { 81 static void RecordLoop(scoped_refptr<LoopRecorder> recorder) {
82 recorder->RecordRun(); 82 recorder->RecordRun();
83 } 83 }
84 84
85 static void RecordLoopAndQuit(scoped_refptr<LoopRecorder> recorder) { 85 static void RecordLoopAndQuit(scoped_refptr<LoopRecorder> recorder) {
86 recorder->RecordRun(); 86 recorder->RecordRun();
87 MessageLoop::current()->Quit(); 87 MessageLoop::current()->QuitWhenIdle();
88 } 88 }
89 89
90 void UnblockTaskThread() { 90 void UnblockTaskThread() {
91 thread_sync_.Signal(); 91 thread_sync_.Signal();
92 } 92 }
93 93
94 void BlockTaskThreadHelper() { 94 void BlockTaskThreadHelper() {
95 thread_sync_.Wait(); 95 thread_sync_.Wait();
96 } 96 }
97 97
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 // it, we cannot just delete it because PostTaskAndReplyRelay's destructor 257 // it, we cannot just delete it because PostTaskAndReplyRelay's destructor
258 // checks that MessageLoop::current() is the the same as when the 258 // checks that MessageLoop::current() is the the same as when the
259 // PostTaskAndReplyRelay object was constructed. However, this loop must have 259 // PostTaskAndReplyRelay object was constructed. However, this loop must have
260 // aleady been deleted in order to perform this test. See 260 // aleady been deleted in order to perform this test. See
261 // http://crbug.com/86301. 261 // http://crbug.com/86301.
262 } 262 }
263 263
264 } // namespace 264 } // namespace
265 265
266 } // namespace base 266 } // namespace base
OLDNEW
« no previous file with comments | « base/file_util_proxy_unittest.cc ('k') | base/message_loop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698