| 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 "components/sync/engine/ui_model_worker.h" | 5 #include "components/sync/engine/ui_model_worker.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
| 13 #include "base/message_loop/message_loop.h" |
| 13 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
| 14 #include "base/test/test_timeouts.h" | 15 #include "base/test/test_timeouts.h" |
| 15 #include "base/threading/platform_thread.h" | 16 #include "base/threading/platform_thread.h" |
| 16 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
| 17 #include "base/threading/thread_task_runner_handle.h" | 18 #include "base/threading/thread_task_runner_handle.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 19 | 20 |
| 20 namespace syncer { | 21 namespace syncer { |
| 21 namespace { | 22 namespace { |
| 22 | 23 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // RequestStop() is called. However, it doesn't fail (no flakes). | 111 // RequestStop() is called. However, it doesn't fail (no flakes). |
| 111 base::PlatformThread::Sleep(TestTimeouts::tiny_timeout()); | 112 base::PlatformThread::Sleep(TestTimeouts::tiny_timeout()); |
| 112 | 113 |
| 113 // The sync thread shouldn't wait for the WorkCallback to run on the UI thread | 114 // The sync thread shouldn't wait for the WorkCallback to run on the UI thread |
| 114 // after RequestStop() is called. | 115 // after RequestStop() is called. |
| 115 worker_->RequestStop(); | 116 worker_->RequestStop(); |
| 116 sync_thread_.Stop(); | 117 sync_thread_.Stop(); |
| 117 } | 118 } |
| 118 | 119 |
| 119 } // namespace syncer | 120 } // namespace syncer |
| OLD | NEW |