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

Side by Side Diff: components/sync_driver/glue/ui_model_worker_unittest.cc

Issue 1414233002: Unify include structure in //components/sync_driver unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
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_driver/glue/ui_model_worker.h"
6
5 #include "base/bind.h" 7 #include "base/bind.h"
6 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
7 #include "base/callback.h" 9 #include "base/callback.h"
8 #include "base/location.h" 10 #include "base/location.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
11 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
12 #include "base/synchronization/waitable_event.h" 14 #include "base/synchronization/waitable_event.h"
13 #include "base/thread_task_runner_handle.h" 15 #include "base/thread_task_runner_handle.h"
14 #include "base/threading/thread.h" 16 #include "base/threading/thread.h"
15 #include "components/sync_driver/glue/ui_model_worker.h"
16 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
17 18
18 using browser_sync::UIModelWorker; 19 using browser_sync::UIModelWorker;
19 using syncer::SyncerError; 20 using syncer::SyncerError;
20 21
21 class UIModelWorkerVisitor { 22 class UIModelWorkerVisitor {
22 public: 23 public:
23 UIModelWorkerVisitor(base::WaitableEvent* was_run, 24 UIModelWorkerVisitor(base::WaitableEvent* was_run,
24 bool quit_loop) 25 bool quit_loop)
25 : quit_loop_when_run_(quit_loop), 26 : quit_loop_when_run_(quit_loop),
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 87
87 syncer_thread()->task_runner()->PostTask( 88 syncer_thread()->task_runner()->PostTask(
88 FROM_HERE, 89 FROM_HERE,
89 base::Bind(&Syncer::SyncShare, base::Unretained(syncer()), v.get())); 90 base::Bind(&Syncer::SyncShare, base::Unretained(syncer()), v.get()));
90 91
91 // We are on the UI thread, so run our loop to process the 92 // We are on the UI thread, so run our loop to process the
92 // (hopefully) scheduled task from a SyncShare invocation. 93 // (hopefully) scheduled task from a SyncShare invocation.
93 base::MessageLoop::current()->Run(); 94 base::MessageLoop::current()->Run();
94 syncer_thread()->Stop(); 95 syncer_thread()->Stop();
95 } 96 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698