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 "sync/internal_api/sync_manager_impl.h" | 5 #include "sync/internal_api/sync_manager_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
727 if (!connection_manager_->set_auth_token(credentials.sync_token)) | 727 if (!connection_manager_->set_auth_token(credentials.sync_token)) |
728 return; // Auth token is known to be invalid, so exit early. | 728 return; // Auth token is known to be invalid, so exit early. |
729 | 729 |
730 sync_notifier_->UpdateCredentials(credentials.email, credentials.sync_token); | 730 sync_notifier_->UpdateCredentials(credentials.email, credentials.sync_token); |
731 scheduler_->OnCredentialsUpdated(); | 731 scheduler_->OnCredentialsUpdated(); |
732 } | 732 } |
733 | 733 |
734 void SyncManagerImpl::UpdateEnabledTypes( | 734 void SyncManagerImpl::UpdateEnabledTypes( |
735 const ModelTypeSet& enabled_types) { | 735 const ModelTypeSet& enabled_types) { |
736 DCHECK(thread_checker_.CalledOnValidThread()); | 736 DCHECK(thread_checker_.CalledOnValidThread()); |
737 sync_notifier_->UpdateRegisteredIds(this, | 737 sync_notifier_->UpdateRegisteredIds( |
738 ModelTypeSetToObjectIdSet(enabled_types)); | 738 this, |
739 ModelTypeSetToObjectIdSet(enabled_types)); | |
740 } | |
741 | |
742 void SyncManagerImpl::UpdateRegisteredIds( | |
tim (not reviewing)
2012/08/01 21:52:52
It'd be nice, maybe just while it's still explicit
akalin
2012/08/02 08:05:43
Done. Renamed to UpdateRegisteredInvalidationIds.
| |
743 SyncNotifierObserver* handler, const ObjectIdSet& ids) { | |
744 DCHECK(thread_checker_.CalledOnValidThread()); | |
745 sync_notifier_->UpdateRegisteredIds(handler, ids); | |
739 } | 746 } |
740 | 747 |
741 void SyncManagerImpl::SetEncryptionPassphrase( | 748 void SyncManagerImpl::SetEncryptionPassphrase( |
742 const std::string& passphrase, | 749 const std::string& passphrase, |
743 bool is_explicit) { | 750 bool is_explicit) { |
744 DCHECK(thread_checker_.CalledOnValidThread()); | 751 DCHECK(thread_checker_.CalledOnValidThread()); |
745 // We do not accept empty passphrases. | 752 // We do not accept empty passphrases. |
746 if (passphrase.empty()) { | 753 if (passphrase.empty()) { |
747 NOTREACHED() << "Cannot encrypt with an empty passphrase."; | 754 NOTREACHED() << "Cannot encrypt with an empty passphrase."; |
748 return; | 755 return; |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1873 int SyncManagerImpl::GetDefaultNudgeDelay() { | 1880 int SyncManagerImpl::GetDefaultNudgeDelay() { |
1874 return kDefaultNudgeDelayMilliseconds; | 1881 return kDefaultNudgeDelayMilliseconds; |
1875 } | 1882 } |
1876 | 1883 |
1877 // static. | 1884 // static. |
1878 int SyncManagerImpl::GetPreferencesNudgeDelay() { | 1885 int SyncManagerImpl::GetPreferencesNudgeDelay() { |
1879 return kPreferencesNudgeDelayMilliseconds; | 1886 return kPreferencesNudgeDelayMilliseconds; |
1880 } | 1887 } |
1881 | 1888 |
1882 } // namespace syncer | 1889 } // namespace syncer |
OLD | NEW |