| Index: chrome/browser/sync/glue/new_non_frontend_data_type_controller.h
|
| diff --git a/chrome/browser/sync/glue/new_non_frontend_data_type_controller.h b/chrome/browser/sync/glue/new_non_frontend_data_type_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..45443585cdd53ef22741b5f9301dd6f3954e594d
|
| --- /dev/null
|
| +++ b/chrome/browser/sync/glue/new_non_frontend_data_type_controller.h
|
| @@ -0,0 +1,64 @@
|
| +// Copyright (c) 2011 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 CHROME_BROWSER_SYNC_GLUE_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_H_
|
| +#define CHROME_BROWSER_SYNC_GLUE_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_H_
|
| +#pragma once
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "chrome/browser/sync/glue/non_frontend_data_type_controller.h"
|
| +#include "chrome/browser/sync/glue/shared_change_processor.h"
|
| +
|
| +class SyncableService;
|
| +
|
| +namespace sync_api {
|
| +struct UserShare;
|
| +}
|
| +
|
| +namespace browser_sync {
|
| +
|
| +class NewNonFrontendDataTypeController : public NonFrontendDataTypeController {
|
| + public:
|
| + NewNonFrontendDataTypeController(
|
| + ProfileSyncFactory* profile_sync_factory,
|
| + Profile* profile);
|
| + virtual ~NewNonFrontendDataTypeController();
|
| +
|
| + virtual void Start(StartCallback* start_callback) OVERRIDE;
|
| + virtual void Stop() OVERRIDE;
|
| +
|
| + protected:
|
| + NewNonFrontendDataTypeController();
|
| + virtual void StartAssociation() OVERRIDE;
|
| +
|
| + // Extract/create the syncable service from the profile.
|
| + virtual SyncableService* GetSyncableService() const = 0;
|
| +
|
| + // We make this static because it's possible the thread it gets posted to is
|
| + // blocked on I/O or similar and we don't want to block sync shutdown.
|
| + static void StopLocalService(
|
| + SyncableService* service, syncable::ModelType type);
|
| + // Posts StopLocalService to appropriate thread.
|
| + virtual bool StopLocalServiceAsync() = 0;
|
| +
|
| + // Return this datatype's syncable service.
|
| + virtual SyncableService* local_service() const;
|
| +
|
| + private:
|
| + // Deprecated.
|
| + virtual bool StopAssociationAsync() OVERRIDE;
|
| + virtual void CreateSyncComponents() OVERRIDE;
|
| +
|
| + sync_api::UserShare* user_share_;
|
| +
|
| + // A pointer to the actual local syncable service, which performs all the
|
| + // real work. We do not own the object.
|
| + SyncableService* local_service_;
|
| +
|
| + scoped_refptr<SharedChangeProcessor> shared_change_processor_;
|
| +};
|
| +
|
| +} // namespace browser_sync
|
| +
|
| +#endif // CHROME_BROWSER_SYNC_GLUE_NEW_NON_FRONTEND_DATA_TYPE_CONTROLLER_H_
|
|
|