chromium/components/sync/model/proxy_data_type_controller_delegate.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/sync/model/proxy_data_type_controller_delegate.h"

#include <utility>

#include "base/functional/bind.h"
#include "base/task/bind_post_task.h"
#include "base/task/sequenced_task_runner.h"
#include "components/sync/engine/data_type_activation_response.h"
#include "components/sync/model/data_type_activation_request.h"
#include "components/sync/model/type_entities_count.h"

namespace syncer {
namespace {

void OnSyncStartingHelperOnModelThread(
    const DataTypeActivationRequest& request,
    DataTypeControllerDelegate::StartCallback callback_bound_to_ui_thread,
    base::WeakPtr<DataTypeControllerDelegate> delegate) {}

void HasUnsyncedDataHelperOnModelThread(
    base::OnceCallback<void(bool)> callback_bound_to_ui_thread,
    base::WeakPtr<DataTypeControllerDelegate> delegate) {}

void GetAllNodesForDebuggingHelperOnModelThread(
    ProxyDataTypeControllerDelegate::AllNodesCallback
        callback_bound_to_ui_thread,
    base::WeakPtr<DataTypeControllerDelegate> delegate) {}

void GetTypeEntitiesCountForDebuggingHelperOnModelThread(
    base::OnceCallback<void(const TypeEntitiesCount&)>
        callback_bound_to_ui_thread,
    base::WeakPtr<DataTypeControllerDelegate> delegate) {}

void StopSyncHelperOnModelThread(
    SyncStopMetadataFate metadata_fate,
    base::WeakPtr<DataTypeControllerDelegate> delegate) {}

void RecordMemoryUsageAndCountsHistogramsHelperOnModelThread(
    base::WeakPtr<DataTypeControllerDelegate> delegate) {}

void ClearMetadataIfStoppedHelperOnModelThread(
    base::WeakPtr<DataTypeControllerDelegate> delegate) {}

void ReportBridgeErrorOnModelThreadForTest(  // IN-TEST
    base::WeakPtr<DataTypeControllerDelegate> delegate) {}

// Rurns some task on the destination task runner (backend sequence), first
// exercising |delegate_provider| *also* in the backend sequence.
void RunModelTask(
    const ProxyDataTypeControllerDelegate::DelegateProvider& delegate_provider,
    base::OnceCallback<void(base::WeakPtr<DataTypeControllerDelegate>)> task) {}

}  // namespace

ProxyDataTypeControllerDelegate::ProxyDataTypeControllerDelegate(
    const scoped_refptr<base::SequencedTaskRunner>& task_runner,
    const DelegateProvider& delegate_provider)
    :{}

ProxyDataTypeControllerDelegate::~ProxyDataTypeControllerDelegate() = default;

void ProxyDataTypeControllerDelegate::OnSyncStarting(
    const DataTypeActivationRequest& request,
    StartCallback callback) {}

void ProxyDataTypeControllerDelegate::OnSyncStopping(
    SyncStopMetadataFate metadata_fate) {}

void ProxyDataTypeControllerDelegate::HasUnsyncedData(
    base::OnceCallback<void(bool)> callback) {}

void ProxyDataTypeControllerDelegate::GetAllNodesForDebugging(
    AllNodesCallback callback) {}

void ProxyDataTypeControllerDelegate::GetTypeEntitiesCountForDebugging(
    base::OnceCallback<void(const TypeEntitiesCount&)> callback) const {}

void ProxyDataTypeControllerDelegate::RecordMemoryUsageAndCountsHistograms() {}

void ProxyDataTypeControllerDelegate::ClearMetadataIfStopped() {}

void ProxyDataTypeControllerDelegate::ReportBridgeErrorForTest() {}

void ProxyDataTypeControllerDelegate::PostTask(
    const base::Location& location,
    base::OnceCallback<void(base::WeakPtr<DataTypeControllerDelegate>)> task)
    const {}

}  // namespace syncer