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

Unified Diff: components/sync_driver/fake_data_type_controller.h

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
Index: components/sync_driver/fake_data_type_controller.h
diff --git a/components/sync_driver/fake_data_type_controller.h b/components/sync_driver/fake_data_type_controller.h
deleted file mode 100644
index 0b84374e28783487812fc851937807fa1cf4a063..0000000000000000000000000000000000000000
--- a/components/sync_driver/fake_data_type_controller.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_SYNC_DRIVER_FAKE_DATA_TYPE_CONTROLLER_H__
-#define COMPONENTS_SYNC_DRIVER_FAKE_DATA_TYPE_CONTROLLER_H__
-
-#include <string>
-
-#include "components/sync_driver/data_type_manager.h"
-#include "components/sync_driver/directory_data_type_controller.h"
-
-namespace sync_driver {
-
-// Fake DataTypeController implementation that simulates the state
-// machine of a typical asynchronous data type.
-//
-// TODO(akalin): Consider using subclasses of
-// {Frontend,NonFrontend,NewNonFrontend}DataTypeController instead, so
-// that we don't have to update this class if we change the expected
-// behavior of controllers. (It would be easier of the above classes
-// used delegation instead of subclassing for per-data-type
-// functionality.)
-class FakeDataTypeController : public DirectoryDataTypeController {
- public:
- explicit FakeDataTypeController(syncer::ModelType type);
-
- // DirectoryDataTypeController implementation.
- bool ShouldLoadModelBeforeConfigure() const override;
- void LoadModels(const ModelLoadCallback& model_load_callback) override;
- void RegisterWithBackend(BackendDataTypeConfigurer* configurer) override;
- void StartAssociating(const StartCallback& start_callback) override;
- void Stop() override;
- syncer::ModelType type() const override;
- std::string name() const override;
- syncer::ModelSafeGroup model_safe_group() const override;
- ChangeProcessor* GetChangeProcessor() const override;
- State state() const override;
- void OnSingleDataTypeUnrecoverableError(
- const syncer::SyncError& error) override;
- bool ReadyForStart() const override;
-
- void FinishStart(ConfigureResult result);
-
- void SetDelayModelLoad();
-
- void SetModelLoadError(syncer::SyncError error);
-
- void SimulateModelLoadFinishing();
-
- void SetReadyForStart(bool ready);
-
- void SetShouldLoadModelBeforeConfigure(bool value);
-
- int register_with_backend_call_count() const {
- return register_with_backend_call_count_;
- }
-
- protected:
- ~FakeDataTypeController() override;
-
- private:
- DataTypeController::State state_;
- bool model_load_delayed_;
- syncer::ModelType type_;
- StartCallback last_start_callback_;
- ModelLoadCallback model_load_callback_;
- syncer::SyncError load_error_;
- bool ready_for_start_;
- bool should_load_model_before_configure_;
- int register_with_backend_call_count_;
-};
-
-} // namespace sync_driver
-
-#endif // COMPONENTS_SYNC_DRIVER_FAKE_DATA_TYPE_CONTROLLER_H__
« no previous file with comments | « components/sync_driver/directory_data_type_controller.cc ('k') | components/sync_driver/fake_data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698