| 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 270 |
| 271 // Now that we have opened the Directory we can restore any previously saved | 271 // Now that we have opened the Directory we can restore any previously saved |
| 272 // nigori specifics. | 272 // nigori specifics. |
| 273 if (args->saved_nigori_state) { | 273 if (args->saved_nigori_state) { |
| 274 sync_encryption_handler_->RestoreNigori(*args->saved_nigori_state); | 274 sync_encryption_handler_->RestoreNigori(*args->saved_nigori_state); |
| 275 args->saved_nigori_state.reset(); | 275 args->saved_nigori_state.reset(); |
| 276 } | 276 } |
| 277 | 277 |
| 278 if (args->enable_local_sync_backend) { | 278 if (args->enable_local_sync_backend) { |
| 279 VLOG(1) << "Running against local sync backend."; | 279 VLOG(1) << "Running against local sync backend."; |
| 280 allstatus_.SetLocalBackendFolder( |
| 281 args->local_sync_backend_folder.AsUTF8Unsafe()); |
| 280 connection_manager_ = base::MakeUnique<LoopbackConnectionManager>( | 282 connection_manager_ = base::MakeUnique<LoopbackConnectionManager>( |
| 281 args->cancelation_signal, args->local_sync_backend_folder); | 283 args->cancelation_signal, args->local_sync_backend_folder); |
| 282 } else { | 284 } else { |
| 283 connection_manager_ = base::MakeUnique<SyncServerConnectionManager>( | 285 connection_manager_ = base::MakeUnique<SyncServerConnectionManager>( |
| 284 args->service_url.host() + args->service_url.path(), | 286 args->service_url.host() + args->service_url.path(), |
| 285 args->service_url.EffectiveIntPort(), | 287 args->service_url.EffectiveIntPort(), |
| 286 args->service_url.SchemeIsCryptographic(), args->post_factory.release(), | 288 args->service_url.SchemeIsCryptographic(), args->post_factory.release(), |
| 287 args->cancelation_signal); | 289 args->cancelation_signal); |
| 288 } | 290 } |
| 289 connection_manager_->set_client_id(directory()->cache_guid()); | 291 connection_manager_->set_client_id(directory()->cache_guid()); |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 DCHECK(thread_checker_.CalledOnValidThread()); | 1007 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1006 cycle_context_->set_cookie_jar_mismatch(account_mismatch); | 1008 cycle_context_->set_cookie_jar_mismatch(account_mismatch); |
| 1007 cycle_context_->set_cookie_jar_empty(empty_jar); | 1009 cycle_context_->set_cookie_jar_empty(empty_jar); |
| 1008 } | 1010 } |
| 1009 | 1011 |
| 1010 void SyncManagerImpl::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) { | 1012 void SyncManagerImpl::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) { |
| 1011 directory()->OnMemoryDump(pmd); | 1013 directory()->OnMemoryDump(pmd); |
| 1012 } | 1014 } |
| 1013 | 1015 |
| 1014 } // namespace syncer | 1016 } // namespace syncer |
| OLD | NEW |