OLD | NEW |
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 "chrome/browser/chromeos/drive/test_util.h" | 5 #include "chrome/browser/chromeos/drive/test_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // Assuming the there is no other worker pool task, the task sent here | 81 // Assuming the there is no other worker pool task, the task sent here |
82 // will run on the same thread. | 82 // will run on the same thread. |
83 const bool posted = base::WorkerPool::PostTaskAndReply( | 83 const bool posted = base::WorkerPool::PostTaskAndReply( |
84 FROM_HERE, | 84 FROM_HERE, |
85 base::Bind(&base::DoNothing), | 85 base::Bind(&base::DoNothing), |
86 base::Bind(base::MessageLoop::QuitClosure()), | 86 base::Bind(base::MessageLoop::QuitClosure()), |
87 true /* task_is_slow */); | 87 true /* task_is_slow */); |
88 DCHECK(posted); | 88 DCHECK(posted); |
89 | 89 |
90 // Wait for the task sent above. | 90 // Wait for the task sent above. |
91 MessageLoop::current()->Run(); | 91 base::MessageLoop::current()->Run(); |
92 } | 92 } |
93 | 93 |
94 } // namespace test_util | 94 } // namespace test_util |
95 } // namespace drive | 95 } // namespace drive |
OLD | NEW |