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

Unified Diff: sync/api/model_type_service.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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
« no previous file with comments | « sync/api/model_type_service.h ('k') | sync/api/model_type_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/api/model_type_service.cc
diff --git a/sync/api/model_type_service.cc b/sync/api/model_type_service.cc
deleted file mode 100644
index 1e1ea1cd2d2bb72768f30fb5941046ead054d1f3..0000000000000000000000000000000000000000
--- a/sync/api/model_type_service.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2015 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.
-
-#include "sync/api/model_type_service.h"
-
-#include "sync/api/model_type_change_processor.h"
-#include "sync/internal_api/public/data_type_error_handler.h"
-
-namespace syncer_v2 {
-
-ModelTypeService::ModelTypeService(
- const ChangeProcessorFactory& change_processor_factory,
- syncer::ModelType type)
- : change_processor_factory_(change_processor_factory), type_(type) {}
-
-ModelTypeService::~ModelTypeService() {}
-
-ConflictResolution ModelTypeService::ResolveConflict(
- const EntityData& local_data,
- const EntityData& remote_data) const {
- // TODO(maxbogue): Add tests once a file exists for them (crbug.com/543407).
- if (remote_data.is_deleted()) {
- DCHECK(!local_data.is_deleted());
- return ConflictResolution::UseLocal();
- }
- return ConflictResolution::UseRemote();
-}
-
-void ModelTypeService::OnSyncStarting(
- syncer::DataTypeErrorHandler* error_handler,
- const ModelTypeChangeProcessor::StartCallback& start_callback) {
- CreateChangeProcessor();
- change_processor_->OnSyncStarting(error_handler, start_callback);
-}
-
-void ModelTypeService::DisableSync() {
- DCHECK(change_processor_);
- change_processor_->DisableSync();
- change_processor_.reset();
-}
-
-void ModelTypeService::CreateChangeProcessor() {
- if (!change_processor_) {
- change_processor_ = change_processor_factory_.Run(type_, this);
- DCHECK(change_processor_);
- OnChangeProcessorSet();
- }
-}
-
-ModelTypeChangeProcessor* ModelTypeService::change_processor() const {
- return change_processor_.get();
-}
-
-void ModelTypeService::clear_change_processor() {
- change_processor_.reset();
-}
-
-} // namespace syncer_v2
« no previous file with comments | « sync/api/model_type_service.h ('k') | sync/api/model_type_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698