OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
971 void SyncBackendHost::Core::HandleInitalizationCompletedOnFrontendLoop() { | 971 void SyncBackendHost::Core::HandleInitalizationCompletedOnFrontendLoop() { |
972 if (!host_) | 972 if (!host_) |
973 return; | 973 return; |
974 host_->HandleInitializationCompletedOnFrontendLoop(); | 974 host_->HandleInitializationCompletedOnFrontendLoop(); |
975 } | 975 } |
976 | 976 |
977 void SyncBackendHost::HandleInitializationCompletedOnFrontendLoop() { | 977 void SyncBackendHost::HandleInitializationCompletedOnFrontendLoop() { |
978 if (!frontend_) | 978 if (!frontend_) |
979 return; | 979 return; |
980 syncapi_initialized_ = true; | 980 syncapi_initialized_ = true; |
981 // Now that the syncapi is intiialized, we can update the cryptographer (and | |
982 // can handle any ON_PASSPHRASE_REQUIRED notifications that may arise). | |
983 core_->syncapi()->ReloadNigori(); | |
tim (not reviewing)
2011/06/14 01:32:58
Im trying to think of a better name for this... M
Nicolas Zea
2011/06/14 16:52:38
Done.
| |
981 frontend_->OnBackendInitialized(); | 984 frontend_->OnBackendInitialized(); |
982 } | 985 } |
983 | 986 |
984 bool SyncBackendHost::Core::IsCurrentThreadSafeForModel( | 987 bool SyncBackendHost::Core::IsCurrentThreadSafeForModel( |
985 syncable::ModelType model_type) { | 988 syncable::ModelType model_type) { |
986 base::AutoLock lock(host_->registrar_lock_); | 989 base::AutoLock lock(host_->registrar_lock_); |
987 | 990 |
988 browser_sync::ModelSafeRoutingInfo::const_iterator routing_it = | 991 browser_sync::ModelSafeRoutingInfo::const_iterator routing_it = |
989 host_->registrar_.routing_info.find(model_type); | 992 host_->registrar_.routing_info.find(model_type); |
990 if (routing_it == host_->registrar_.routing_info.end()) | 993 if (routing_it == host_->registrar_.routing_info.end()) |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1200 DCHECK_EQ(MessageLoop::current(), host_->core_thread_.message_loop()); | 1203 DCHECK_EQ(MessageLoop::current(), host_->core_thread_.message_loop()); |
1201 syncapi_->GetJsBackend()->ProcessMessage(name, args, sender); | 1204 syncapi_->GetJsBackend()->ProcessMessage(name, args, sender); |
1202 } | 1205 } |
1203 | 1206 |
1204 void SyncBackendHost::Core::DeferNudgeForCleanup() { | 1207 void SyncBackendHost::Core::DeferNudgeForCleanup() { |
1205 DCHECK_EQ(MessageLoop::current(), host_->core_thread_.message_loop()); | 1208 DCHECK_EQ(MessageLoop::current(), host_->core_thread_.message_loop()); |
1206 deferred_nudge_for_cleanup_requested_ = true; | 1209 deferred_nudge_for_cleanup_requested_ = true; |
1207 } | 1210 } |
1208 | 1211 |
1209 } // namespace browser_sync | 1212 } // namespace browser_sync |
OLD | NEW |