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

Unified Diff: components/sync/driver/glue/ui_model_worker_unittest.cc

Issue 2203673002: [Sync] Move //components/sync_driver to //components/sync/driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sd-a
Patch Set: Full change rebased on static lib. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/driver/glue/ui_model_worker.cc ('k') | components/sync/driver/invalidation_adapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « components/sync/driver/glue/ui_model_worker.cc ('k') | components/sync/driver/invalidation_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698