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

Side by Side Diff: chrome/browser/sync/glue/ui_model_worker_unittest.cc

Issue 7633077: Refactor syncapi.h (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: This patch has compiled from a clean build Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/glue/ui_model_worker.h ('k') | chrome/browser/sync/internal_api/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/synchronization/waitable_event.h"
8 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
9 #include "base/synchronization/waitable_event.h" 10 #include "chrome/browser/sync/glue/ui_model_worker.h"
10 #include "content/browser/browser_thread.h" 11 #include "content/browser/browser_thread.h"
11 #include "chrome/browser/sync/engine/syncapi.h"
12 #include "chrome/browser/sync/glue/ui_model_worker.h"
13 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
14 13
15 using browser_sync::UIModelWorker; 14 using browser_sync::UIModelWorker;
16 15
17 // Various boilerplate, primarily for the StopWithPendingWork test. 16 // Various boilerplate, primarily for the StopWithPendingWork test.
18 17
19 class UIModelWorkerVisitor { 18 class UIModelWorkerVisitor {
20 public: 19 public:
21 UIModelWorkerVisitor(base::WaitableEvent* was_run, 20 UIModelWorkerVisitor(base::WaitableEvent* was_run,
22 bool quit_loop) 21 bool quit_loop)
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 new FakeSyncShareTask(syncer(), fox3.get())); 216 new FakeSyncShareTask(syncer(), fox3.get()));
218 217
219 // This is what gets the UI thread blocked until NotifyExitRequested, 218 // This is what gets the UI thread blocked until NotifyExitRequested,
220 // which is called when FakeSyncapiShutdownTask runs and deletes the syncer. 219 // which is called when FakeSyncapiShutdownTask runs and deletes the syncer.
221 bmw()->Stop(); 220 bmw()->Stop();
222 221
223 // Was the thread killed? 222 // Was the thread killed?
224 EXPECT_FALSE(syncer_thread()->IsRunning()); 223 EXPECT_FALSE(syncer_thread()->IsRunning());
225 core_thread()->Stop(); 224 core_thread()->Stop();
226 } 225 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/ui_model_worker.h ('k') | chrome/browser/sync/internal_api/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698