| OLD | NEW |
| 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 "components/sync/engine_impl/sync_manager_impl.h" | 5 #include "components/sync/engine_impl/sync_manager_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 connection_manager_->set_client_id(directory()->cache_guid()); | 289 connection_manager_->set_client_id(directory()->cache_guid()); |
| 290 connection_manager_->AddListener(this); | 290 connection_manager_->AddListener(this); |
| 291 | 291 |
| 292 std::string sync_id = directory()->cache_guid(); | 292 std::string sync_id = directory()->cache_guid(); |
| 293 | 293 |
| 294 DVLOG(1) << "Setting sync client ID: " << sync_id; | 294 DVLOG(1) << "Setting sync client ID: " << sync_id; |
| 295 allstatus_.SetSyncId(sync_id); | 295 allstatus_.SetSyncId(sync_id); |
| 296 DVLOG(1) << "Setting invalidator client ID: " << args->invalidator_client_id; | 296 DVLOG(1) << "Setting invalidator client ID: " << args->invalidator_client_id; |
| 297 allstatus_.SetInvalidatorClientId(args->invalidator_client_id); | 297 allstatus_.SetInvalidatorClientId(args->invalidator_client_id); |
| 298 | 298 |
| 299 // TODO(crbug.com/658002): Pass in the real USS migrator function once initial | |
| 300 // GetUpdates issues are addressed. | |
| 301 model_type_registry_ = base::MakeUnique<ModelTypeRegistry>( | 299 model_type_registry_ = base::MakeUnique<ModelTypeRegistry>( |
| 302 args->workers, &share_, this, UssMigrator()); | 300 args->workers, &share_, this, base::Bind(&MigrateDirectoryData)); |
| 303 sync_encryption_handler_->AddObserver(model_type_registry_.get()); | 301 sync_encryption_handler_->AddObserver(model_type_registry_.get()); |
| 304 | 302 |
| 305 // Build a SyncCycleContext and store the worker in it. | 303 // Build a SyncCycleContext and store the worker in it. |
| 306 DVLOG(1) << "Sync is bringing up SyncCycleContext."; | 304 DVLOG(1) << "Sync is bringing up SyncCycleContext."; |
| 307 std::vector<SyncEngineEventListener*> listeners; | 305 std::vector<SyncEngineEventListener*> listeners; |
| 308 listeners.push_back(&allstatus_); | 306 listeners.push_back(&allstatus_); |
| 309 listeners.push_back(this); | 307 listeners.push_back(this); |
| 310 cycle_context_ = args->engine_components_factory->BuildContext( | 308 cycle_context_ = args->engine_components_factory->BuildContext( |
| 311 connection_manager_.get(), directory(), args->extensions_activity, | 309 connection_manager_.get(), directory(), args->extensions_activity, |
| 312 listeners, &debug_info_event_listener_, model_type_registry_.get(), | 310 listeners, &debug_info_event_listener_, model_type_registry_.get(), |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1007 DCHECK(thread_checker_.CalledOnValidThread()); | 1005 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1008 cycle_context_->set_cookie_jar_mismatch(account_mismatch); | 1006 cycle_context_->set_cookie_jar_mismatch(account_mismatch); |
| 1009 cycle_context_->set_cookie_jar_empty(empty_jar); | 1007 cycle_context_->set_cookie_jar_empty(empty_jar); |
| 1010 } | 1008 } |
| 1011 | 1009 |
| 1012 void SyncManagerImpl::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) { | 1010 void SyncManagerImpl::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) { |
| 1013 directory()->OnMemoryDump(pmd); | 1011 directory()->OnMemoryDump(pmd); |
| 1014 } | 1012 } |
| 1015 | 1013 |
| 1016 } // namespace syncer | 1014 } // namespace syncer |
| OLD | NEW |