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

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 1314903004: Sync: Refactoring DataTypeController to make the design shareable with USS datatypes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR comments Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/sync/profile_sync_service.h" 5 #include "chrome/browser/sync/profile_sync_service.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 DCHECK(signin_client); 1151 DCHECK(signin_client);
1152 std::string signin_scoped_device_id = 1152 std::string signin_scoped_device_id =
1153 signin_client->GetSigninScopedDeviceId(); 1153 signin_client->GetSigninScopedDeviceId();
1154 1154
1155 // Initialize local device info. 1155 // Initialize local device info.
1156 local_device_->Initialize(cache_guid, signin_scoped_device_id); 1156 local_device_->Initialize(cache_guid, signin_scoped_device_id);
1157 1157
1158 DVLOG(1) << "Setting preferred types for non-blocking DTM"; 1158 DVLOG(1) << "Setting preferred types for non-blocking DTM";
1159 non_blocking_data_type_manager_.SetPreferredTypes(GetPreferredDataTypes()); 1159 non_blocking_data_type_manager_.SetPreferredTypes(GetPreferredDataTypes());
1160 1160
1161 // Give the DataTypeControllers a handle to the now initialized backend
1162 // as a UserShare.
1163 for (DataTypeController::TypeMap::iterator it =
1164 directory_data_type_controllers_.begin();
1165 it != directory_data_type_controllers_.end(); ++it) {
1166 it->second->OnUserShareReady(GetUserShare());
1167 }
1168
1169 if (backend_mode_ == BACKUP || backend_mode_ == ROLLBACK) 1161 if (backend_mode_ == BACKUP || backend_mode_ == ROLLBACK)
1170 ConfigureDataTypeManager(); 1162 ConfigureDataTypeManager();
1171 else 1163 else
1172 PostBackendInitialization(); 1164 PostBackendInitialization();
1173 } 1165 }
1174 1166
1175 void ProfileSyncService::OnSyncCycleCompleted() { 1167 void ProfileSyncService::OnSyncCycleCompleted() {
1176 UpdateLastSyncedTime(); 1168 UpdateLastSyncedTime();
1177 if (IsDataTypeControllerRunning(syncer::SESSIONS)) { 1169 if (IsDataTypeControllerRunning(syncer::SESSIONS)) {
1178 // Trigger garbage collection of old sessions now that we've downloaded 1170 // Trigger garbage collection of old sessions now that we've downloaded
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2803 } 2795 }
2804 2796
2805 std::string ProfileSyncService::unrecoverable_error_message() const { 2797 std::string ProfileSyncService::unrecoverable_error_message() const {
2806 return unrecoverable_error_message_; 2798 return unrecoverable_error_message_;
2807 } 2799 }
2808 2800
2809 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() 2801 tracked_objects::Location ProfileSyncService::unrecoverable_error_location()
2810 const { 2802 const {
2811 return unrecoverable_error_location_; 2803 return unrecoverable_error_location_;
2812 } 2804 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service.h ('k') | chrome/browser/sync/profile_sync_service_autofill_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698