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

Side by Side Diff: base/sequence_checker_unittest.cc

Issue 2103333006: Remove calls to deprecated MessageLoop methods in base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « base/observer_list_unittest.cc ('k') | base/synchronization/waitable_event_watcher_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/sequence_checker.h" 5 #include "base/sequence_checker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 void PostDoStuffToOtherThread( 89 void PostDoStuffToOtherThread(
90 SequenceCheckedObject* sequence_checked_object) { 90 SequenceCheckedObject* sequence_checked_object) {
91 other_thread()->task_runner()->PostTask( 91 other_thread()->task_runner()->PostTask(
92 FROM_HERE, base::Bind(&SequenceCheckedObject::DoStuff, 92 FROM_HERE, base::Bind(&SequenceCheckedObject::DoStuff,
93 base::Unretained(sequence_checked_object))); 93 base::Unretained(sequence_checked_object)));
94 } 94 }
95 95
96 void PostDeleteToOtherThread( 96 void PostDeleteToOtherThread(
97 std::unique_ptr<SequenceCheckedObject> sequence_checked_object) { 97 std::unique_ptr<SequenceCheckedObject> sequence_checked_object) {
98 other_thread()->message_loop()->DeleteSoon( 98 other_thread()->message_loop()->task_runner()->DeleteSoon(
99 FROM_HERE, 99 FROM_HERE, sequence_checked_object.release());
100 sequence_checked_object.release());
101 } 100 }
102 101
103 // Destroys the SequencedWorkerPool instance, blocking until it is fully shut 102 // Destroys the SequencedWorkerPool instance, blocking until it is fully shut
104 // down, and creates a new instance. 103 // down, and creates a new instance.
105 void ResetPool() { 104 void ResetPool() {
106 pool_owner_.reset(new SequencedWorkerPoolOwner(kNumWorkerThreads, "test")); 105 pool_owner_.reset(new SequencedWorkerPoolOwner(kNumWorkerThreads, "test"));
107 } 106 }
108 107
109 void MethodOnDifferentThreadDeathTest(); 108 void MethodOnDifferentThreadDeathTest();
110 void DetachThenCallFromDifferentThreadDeathTest(); 109 void DetachThenCallFromDifferentThreadDeathTest();
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 #endif // ENABLE_SEQUENCE_CHECKER 326 #endif // ENABLE_SEQUENCE_CHECKER
328 327
329 #endif // GTEST_HAS_DEATH_TEST || !ENABLE_SEQUENCE_CHECKER 328 #endif // GTEST_HAS_DEATH_TEST || !ENABLE_SEQUENCE_CHECKER
330 329
331 } // namespace 330 } // namespace
332 331
333 } // namespace base 332 } // namespace base
334 333
335 // Just in case we ever get lumped together with other compilation units. 334 // Just in case we ever get lumped together with other compilation units.
336 #undef ENABLE_SEQUENCE_CHECKER 335 #undef ENABLE_SEQUENCE_CHECKER
OLDNEW
« no previous file with comments | « base/observer_list_unittest.cc ('k') | base/synchronization/waitable_event_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698