| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 model_type_registry_ = | 299 model_type_registry_ = |
| 300 base::MakeUnique<ModelTypeRegistry>(args->workers, directory(), this); | 300 base::MakeUnique<ModelTypeRegistry>(args->workers, &share_, this); |
| 301 sync_encryption_handler_->AddObserver(model_type_registry_.get()); | 301 sync_encryption_handler_->AddObserver(model_type_registry_.get()); |
| 302 | 302 |
| 303 // Build a SyncCycleContext and store the worker in it. | 303 // Build a SyncCycleContext and store the worker in it. |
| 304 DVLOG(1) << "Sync is bringing up SyncCycleContext."; | 304 DVLOG(1) << "Sync is bringing up SyncCycleContext."; |
| 305 std::vector<SyncEngineEventListener*> listeners; | 305 std::vector<SyncEngineEventListener*> listeners; |
| 306 listeners.push_back(&allstatus_); | 306 listeners.push_back(&allstatus_); |
| 307 listeners.push_back(this); | 307 listeners.push_back(this); |
| 308 cycle_context_ = args->engine_components_factory->BuildContext( | 308 cycle_context_ = args->engine_components_factory->BuildContext( |
| 309 connection_manager_.get(), directory(), args->extensions_activity, | 309 connection_manager_.get(), directory(), args->extensions_activity, |
| 310 listeners, &debug_info_event_listener_, model_type_registry_.get(), | 310 listeners, &debug_info_event_listener_, model_type_registry_.get(), |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 995 } | 995 } |
| 996 | 996 |
| 997 void SyncManagerImpl::OnCookieJarChanged(bool account_mismatch, | 997 void SyncManagerImpl::OnCookieJarChanged(bool account_mismatch, |
| 998 bool empty_jar) { | 998 bool empty_jar) { |
| 999 DCHECK(thread_checker_.CalledOnValidThread()); | 999 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1000 cycle_context_->set_cookie_jar_mismatch(account_mismatch); | 1000 cycle_context_->set_cookie_jar_mismatch(account_mismatch); |
| 1001 cycle_context_->set_cookie_jar_empty(empty_jar); | 1001 cycle_context_->set_cookie_jar_empty(empty_jar); |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 } // namespace syncer | 1004 } // namespace syncer |
| OLD | NEW |