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

Unified Diff: components/sync_driver/device_info_data_type_controller.cc

Issue 597423002: Device info datatype should be moved to components/sync_driver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor CR feedback addressed. Created 6 years, 3 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/chrome/browser/sync/glue/device_info_data_type_controller.cc b/components/sync_driver/device_info_data_type_controller.cc
similarity index 65%
rename from chrome/browser/sync/glue/device_info_data_type_controller.cc
rename to components/sync_driver/device_info_data_type_controller.cc
index 81d0fa82f3f4379313c142a5aa0139472ffba566..592633dc815a2cd93c7c573cf69ce0ee9c089d8d 100644
--- a/chrome/browser/sync/glue/device_info_data_type_controller.cc
+++ b/components/sync_driver/device_info_data_type_controller.cc
@@ -2,22 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/sync/glue/device_info_data_type_controller.h"
+#include "components/sync_driver/device_info_data_type_controller.h"
-#include "chrome/browser/sync/glue/chrome_report_unrecoverable_error.h"
-#include "chrome/browser/sync/glue/local_device_info_provider.h"
-#include "content/public/browser/browser_thread.h"
+#include "base/callback.h"
+#include "components/sync_driver/local_device_info_provider.h"
-using content::BrowserThread;
-
-namespace browser_sync {
+namespace sync_driver {
DeviceInfoDataTypeController::DeviceInfoDataTypeController(
- sync_driver::SyncApiComponentFactory* sync_factory,
+ const scoped_refptr<base::MessageLoopProxy>& ui_thread,
+ const base::Closure& error_callback,
+ SyncApiComponentFactory* sync_factory,
LocalDeviceInfoProvider* local_device_info_provider)
: UIDataTypeController(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
- base::Bind(&ChromeReportUnrecoverableError),
+ ui_thread,
+ error_callback,
syncer::DEVICE_INFO,
sync_factory),
local_device_info_provider_(local_device_info_provider) {
@@ -39,7 +38,6 @@ bool DeviceInfoDataTypeController::StartModels() {
}
void DeviceInfoDataTypeController::OnLocalDeviceInfoLoaded() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(state_, MODEL_STARTING);
DCHECK(local_device_info_provider_->GetLocalDeviceInfo());
@@ -47,4 +45,4 @@ void DeviceInfoDataTypeController::OnLocalDeviceInfoLoaded() {
OnModelLoaded();
}
-} // namespace browser_sync
+} // namespace sync_driver
« no previous file with comments | « components/sync_driver/device_info_data_type_controller.h ('k') | components/sync_driver/device_info_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698