| Index: components/sync/driver/glue/ui_model_worker_unittest.cc
|
| diff --git a/components/sync_driver/glue/ui_model_worker_unittest.cc b/components/sync/driver/glue/ui_model_worker_unittest.cc
|
| similarity index 83%
|
| rename from components/sync_driver/glue/ui_model_worker_unittest.cc
|
| rename to components/sync/driver/glue/ui_model_worker_unittest.cc
|
| index 821bb8eaa13b67d6788b1f0a1bb6e77a716804b0..7ad15d960bb061a9738fd703a27644d97e4be73a 100644
|
| --- a/components/sync_driver/glue/ui_model_worker_unittest.cc
|
| +++ b/components/sync/driver/glue/ui_model_worker_unittest.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "components/sync_driver/glue/ui_model_worker.h"
|
| +#include "components/sync/driver/glue/ui_model_worker.h"
|
|
|
| #include <memory>
|
|
|
| @@ -24,11 +24,9 @@ using syncer::SyncerError;
|
|
|
| class UIModelWorkerVisitor {
|
| public:
|
| - UIModelWorkerVisitor(base::WaitableEvent* was_run,
|
| - bool quit_loop)
|
| - : quit_loop_when_run_(quit_loop),
|
| - was_run_(was_run) { }
|
| - virtual ~UIModelWorkerVisitor() { }
|
| + UIModelWorkerVisitor(base::WaitableEvent* was_run, bool quit_loop)
|
| + : quit_loop_when_run_(quit_loop), was_run_(was_run) {}
|
| + virtual ~UIModelWorkerVisitor() {}
|
|
|
| virtual syncer::SyncerError DoWork() {
|
| was_run_->Signal();
|
| @@ -51,10 +49,11 @@ class Syncer {
|
|
|
| void SyncShare(UIModelWorkerVisitor* visitor) {
|
| // We wait until the callback is executed. So it is safe to use Unretained.
|
| - syncer::WorkCallback c = base::Bind(&UIModelWorkerVisitor::DoWork,
|
| - base::Unretained(visitor));
|
| + syncer::WorkCallback c =
|
| + base::Bind(&UIModelWorkerVisitor::DoWork, base::Unretained(visitor));
|
| worker_->DoWorkAndWaitUntilDone(c);
|
| }
|
| +
|
| private:
|
| scoped_refptr<UIModelWorker> worker_;
|
| DISALLOW_COPY_AND_ASSIGN(Syncer);
|
| @@ -62,8 +61,9 @@ class Syncer {
|
|
|
| class SyncUIModelWorkerTest : public testing::Test {
|
| public:
|
| - SyncUIModelWorkerTest() : faux_syncer_thread_("FauxSyncerThread"),
|
| - faux_core_thread_("FauxCoreThread") { }
|
| + SyncUIModelWorkerTest()
|
| + : faux_syncer_thread_("FauxSyncerThread"),
|
| + faux_core_thread_("FauxCoreThread") {}
|
|
|
| void SetUp() override {
|
| faux_syncer_thread_.Start();
|
| @@ -75,6 +75,7 @@ class SyncUIModelWorkerTest : public testing::Test {
|
| UIModelWorker* bmw() { return bmw_.get(); }
|
| base::Thread* core_thread() { return &faux_core_thread_; }
|
| base::Thread* syncer_thread() { return &faux_syncer_thread_; }
|
| +
|
| private:
|
| base::MessageLoop faux_ui_loop_;
|
| base::Thread faux_syncer_thread_;
|
|
|