Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / sync / internal_api / public / engine / passive_model_worker.h
blobd7f076edd4da519651b0a500e01f76520a15981d
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
3 // found in the LICENSE file.
5 #ifndef SYNC_INTERNAL_API_PUBLIC_ENGINE_PASSIVE_MODEL_WORKER_H_
6 #define SYNC_INTERNAL_API_PUBLIC_ENGINE_PASSIVE_MODEL_WORKER_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "sync/base/sync_export.h"
11 #include "sync/internal_api/public/engine/model_safe_worker.h"
12 #include "sync/internal_api/public/util/syncer_error.h"
14 namespace syncer {
16 // Implementation of ModelSafeWorker for passive types. All work is
17 // done on the same thread DoWorkAndWaitUntilDone (i.e., the sync
18 // thread).
19 class SYNC_EXPORT PassiveModelWorker : public ModelSafeWorker {
20 public:
21 explicit PassiveModelWorker(const base::MessageLoop* sync_loop,
22 WorkerLoopDestructionObserver* observer);
24 // ModelSafeWorker implementation. Called on the sync thread.
25 void RegisterForLoopDestruction() override;
26 ModelSafeGroup GetModelSafeGroup() override;
28 protected:
29 SyncerError DoWorkAndWaitUntilDoneImpl(const WorkCallback& work) override;
31 private:
32 ~PassiveModelWorker() override;
34 const base::MessageLoop* const sync_loop_;
36 DISALLOW_COPY_AND_ASSIGN(PassiveModelWorker);
39 } // namespace syncer
41 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_PASSIVE_MODEL_WORKER_H_