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

Side by Side Diff: chrome/browser/sync/test/engine/fake_model_worker.h

Issue 9036003: Avoid useless SYNC_CYCLE_CONTINUATION sync cycle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
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 #ifndef CHROME_BROWSER_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
6 #define CHROME_BROWSER_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_ 6 #define CHROME_BROWSER_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/threading/non_thread_safe.h" 13 #include "base/threading/non_thread_safe.h"
14 #include "chrome/browser/sync/engine/model_safe_worker.h" 14 #include "chrome/browser/sync/engine/model_safe_worker.h"
15 #include "chrome/browser/sync/engine/syncer_error.h"
15 16
16 namespace browser_sync { 17 namespace browser_sync {
17 18
18 // Fake implementation of ModelSafeWorker that does work on the 19 // Fake implementation of ModelSafeWorker that does work on the
19 // current thread regardless of the group. 20 // current thread regardless of the group.
20 class FakeModelWorker : public ModelSafeWorker { 21 class FakeModelWorker : public ModelSafeWorker {
21 public: 22 public:
22 explicit FakeModelWorker(ModelSafeGroup group); 23 explicit FakeModelWorker(ModelSafeGroup group);
23 24
24 // ModelSafeWorker implementation. 25 // ModelSafeWorker implementation.
25 virtual UnrecoverableErrorInfo DoWorkAndWaitUntilDone( 26 virtual SyncerError DoWorkAndWaitUntilDone(
26 const WorkCallback& work) OVERRIDE; 27 const WorkCallback& work) OVERRIDE;
27 virtual ModelSafeGroup GetModelSafeGroup() OVERRIDE; 28 virtual ModelSafeGroup GetModelSafeGroup() OVERRIDE;
28 29
29 private: 30 private:
30 virtual ~FakeModelWorker(); 31 virtual ~FakeModelWorker();
31 32
32 base::NonThreadSafe non_thread_safe_; 33 base::NonThreadSafe non_thread_safe_;
33 34
34 const ModelSafeGroup group_; 35 const ModelSafeGroup group_;
35 36
36 DISALLOW_COPY_AND_ASSIGN(FakeModelWorker); 37 DISALLOW_COPY_AND_ASSIGN(FakeModelWorker);
37 }; 38 };
38 39
39 } // namespace browser_sync 40 } // namespace browser_sync
40 41
41 #endif // CHROME_BROWSER_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_ 42 #endif // CHROME_BROWSER_SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_
42 43
OLDNEW
« no previous file with comments | « chrome/browser/sync/sessions/test_util.cc ('k') | chrome/browser/sync/test/engine/fake_model_worker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698