OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/glue/sync_backend_host_core.h" | 5 #include "chrome/browser/sync/glue/sync_backend_host_core.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "chrome/browser/sync/glue/device_info.h" | 9 #include "chrome/browser/sync/glue/device_info.h" |
10 #include "chrome/browser/sync/glue/invalidation_adapter.h" | 10 #include "chrome/browser/sync/glue/invalidation_adapter.h" |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 | 515 |
516 registrar_->ActivateDataType(syncer::DEVICE_INFO, | 516 registrar_->ActivateDataType(syncer::DEVICE_INFO, |
517 syncer::GROUP_PASSIVE, | 517 syncer::GROUP_PASSIVE, |
518 synced_device_tracker_.get(), | 518 synced_device_tracker_.get(), |
519 sync_manager_->GetUserShare()); | 519 sync_manager_->GetUserShare()); |
520 | 520 |
521 host_.Call(FROM_HERE, | 521 host_.Call(FROM_HERE, |
522 &SyncBackendHostImpl::HandleInitializationSuccessOnFrontendLoop, | 522 &SyncBackendHostImpl::HandleInitializationSuccessOnFrontendLoop, |
523 js_backend_, | 523 js_backend_, |
524 debug_info_listener_, | 524 debug_info_listener_, |
525 sync_manager_->GetSyncContextProxy(), | 525 sync_manager_->GetSyncContextProxy()); |
526 sync_manager_->cache_guid()); | |
527 | 526 |
528 js_backend_.Reset(); | 527 js_backend_.Reset(); |
529 debug_info_listener_.Reset(); | 528 debug_info_listener_.Reset(); |
530 } | 529 } |
531 | 530 |
532 void SyncBackendHostCore::DoSetDecryptionPassphrase( | 531 void SyncBackendHostCore::DoSetDecryptionPassphrase( |
533 const std::string& passphrase) { | 532 const std::string& passphrase) { |
534 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); | 533 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
535 sync_manager_->GetEncryptionHandler()->SetDecryptionPassphrase( | 534 sync_manager_->GetEncryptionHandler()->SetDecryptionPassphrase( |
536 passphrase); | 535 passphrase); |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 this, &SyncBackendHostCore::SaveChanges); | 741 this, &SyncBackendHostCore::SaveChanges); |
743 } | 742 } |
744 | 743 |
745 void SyncBackendHostCore::SaveChanges() { | 744 void SyncBackendHostCore::SaveChanges() { |
746 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); | 745 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
747 sync_manager_->SaveChanges(); | 746 sync_manager_->SaveChanges(); |
748 } | 747 } |
749 | 748 |
750 } // namespace browser_sync | 749 } // namespace browser_sync |
751 | 750 |
OLD | NEW |