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

Unified Diff: components/sync_driver/device_info_data_type_controller.cc

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/device_info_data_type_controller.cc
diff --git a/components/sync_driver/device_info_data_type_controller.cc b/components/sync_driver/device_info_data_type_controller.cc
deleted file mode 100644
index d17e3ca2cad2008fb66869b0bcadf1429028c024..0000000000000000000000000000000000000000
--- a/components/sync_driver/device_info_data_type_controller.cc
+++ /dev/null
@@ -1,50 +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.
-
-#include "components/sync_driver/device_info_data_type_controller.h"
-
-#include "base/callback.h"
-#include "components/sync_driver/local_device_info_provider.h"
-
-namespace sync_driver {
-
-DeviceInfoDataTypeController::DeviceInfoDataTypeController(
- const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
- const base::Closure& error_callback,
- SyncClient* sync_client,
- LocalDeviceInfoProvider* local_device_info_provider)
- : UIDataTypeController(ui_thread,
- error_callback,
- syncer::DEVICE_INFO,
- sync_client),
- local_device_info_provider_(local_device_info_provider) {}
-
-DeviceInfoDataTypeController::~DeviceInfoDataTypeController() {
-}
-
-bool DeviceInfoDataTypeController::StartModels() {
- // Start the data type as soon as the local device info gets available.
- if (local_device_info_provider_->GetLocalDeviceInfo()) {
- return true;
- }
-
- subscription_ = local_device_info_provider_->RegisterOnInitializedCallback(
- base::Bind(&DeviceInfoDataTypeController::OnLocalDeviceInfoLoaded, this));
-
- return false;
-}
-
-void DeviceInfoDataTypeController::StopModels() {
- subscription_.reset();
-}
-
-void DeviceInfoDataTypeController::OnLocalDeviceInfoLoaded() {
- DCHECK_EQ(state_, MODEL_STARTING);
- DCHECK(local_device_info_provider_->GetLocalDeviceInfo());
-
- subscription_.reset();
- OnModelLoaded();
-}
-
-} // namespace sync_driver

Powered by Google App Engine
This is Rietveld 408576698