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

Side by Side Diff: components/sync/device_info/device_info_data_type_controller.cc

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/sync/device_info/device_info_data_type_controller.h" 5 #include "components/sync/device_info/device_info_data_type_controller.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 8
9 namespace syncer { 9 namespace sync_driver {
10 10
11 DeviceInfoDataTypeController::DeviceInfoDataTypeController( 11 DeviceInfoDataTypeController::DeviceInfoDataTypeController(
12 const base::Closure& dump_stack, 12 const base::Closure& dump_stack,
13 SyncClient* sync_client, 13 SyncClient* sync_client,
14 LocalDeviceInfoProvider* local_device_info_provider) 14 LocalDeviceInfoProvider* local_device_info_provider)
15 : UIDataTypeController(DEVICE_INFO, dump_stack, sync_client), 15 : UIDataTypeController(syncer::DEVICE_INFO, dump_stack, sync_client),
16 local_device_info_provider_(local_device_info_provider) {} 16 local_device_info_provider_(local_device_info_provider) {}
17 17
18 DeviceInfoDataTypeController::~DeviceInfoDataTypeController() {} 18 DeviceInfoDataTypeController::~DeviceInfoDataTypeController() {}
19 19
20 bool DeviceInfoDataTypeController::StartModels() { 20 bool DeviceInfoDataTypeController::StartModels() {
21 DCHECK(CalledOnValidThread()); 21 DCHECK(CalledOnValidThread());
22 // Start the data type as soon as the local device info gets available. 22 // Start the data type as soon as the local device info gets available.
23 if (local_device_info_provider_->GetLocalDeviceInfo()) { 23 if (local_device_info_provider_->GetLocalDeviceInfo()) {
24 return true; 24 return true;
25 } 25 }
(...skipping 12 matching lines...) Expand all
38 38
39 void DeviceInfoDataTypeController::OnLocalDeviceInfoLoaded() { 39 void DeviceInfoDataTypeController::OnLocalDeviceInfoLoaded() {
40 DCHECK(CalledOnValidThread()); 40 DCHECK(CalledOnValidThread());
41 DCHECK_EQ(state_, MODEL_STARTING); 41 DCHECK_EQ(state_, MODEL_STARTING);
42 DCHECK(local_device_info_provider_->GetLocalDeviceInfo()); 42 DCHECK(local_device_info_provider_->GetLocalDeviceInfo());
43 43
44 subscription_.reset(); 44 subscription_.reset();
45 OnModelLoaded(); 45 OnModelLoaded();
46 } 46 }
47 47
48 } // namespace syncer 48 } // namespace sync_driver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698