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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "chrome/browser/sync/glue/sync_backend_host.h" | 7 #include "chrome/browser/sync/glue/sync_backend_host.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
347 CHECK(sync_prefs_.get()); | 347 CHECK(sync_prefs_.get()); |
348 if (sync_prefs_->HasSyncSetupCompleted()) { | 348 if (sync_prefs_->HasSyncSetupCompleted()) { |
349 initial_types_with_nigori.Put(syncable::NIGORI); | 349 initial_types_with_nigori.Put(syncable::NIGORI); |
350 } | 350 } |
351 | 351 |
352 registrar_.reset(new SyncBackendRegistrar(initial_types_with_nigori, | 352 registrar_.reset(new SyncBackendRegistrar(initial_types_with_nigori, |
353 name_, | 353 name_, |
354 profile_, | 354 profile_, |
355 sync_thread_.message_loop())); | 355 sync_thread_.message_loop())); |
356 initialization_state_ = CREATING_SYNC_MANAGER; | 356 initialization_state_ = CREATING_SYNC_MANAGER; |
357 | |
Nicolas Zea
2012/04/03 22:54:21
can revert this file
kochi
2012/04/03 23:35:46
Done.
| |
357 InitCore(DoInitializeOptions( | 358 InitCore(DoInitializeOptions( |
358 sync_thread_.message_loop(), | 359 sync_thread_.message_loop(), |
359 registrar_.get(), | 360 registrar_.get(), |
360 &extensions_activity_monitor_, | 361 &extensions_activity_monitor_, |
361 event_handler, | 362 event_handler, |
362 sync_service_url, | 363 sync_service_url, |
363 base::Bind(&MakeHttpBridgeFactory, | 364 base::Bind(&MakeHttpBridgeFactory, |
364 make_scoped_refptr(profile_->GetRequestContext())), | 365 make_scoped_refptr(profile_->GetRequestContext())), |
365 credentials, | 366 credentials, |
366 &chrome_sync_notification_bridge_, | 367 &chrome_sync_notification_bridge_, |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
913 if (!sync_loop_) | 914 if (!sync_loop_) |
914 return; | 915 return; |
915 DCHECK_EQ(MessageLoop::current(), sync_loop_); | 916 DCHECK_EQ(MessageLoop::current(), sync_loop_); |
916 host_.Call( | 917 host_.Call( |
917 FROM_HERE, | 918 FROM_HERE, |
918 &SyncBackendHost::NotifyPassphraseAccepted); | 919 &SyncBackendHost::NotifyPassphraseAccepted); |
919 } | 920 } |
920 | 921 |
921 void SyncBackendHost::Core::OnBootstrapTokenUpdated( | 922 void SyncBackendHost::Core::OnBootstrapTokenUpdated( |
922 const std::string& bootstrap_token) { | 923 const std::string& bootstrap_token) { |
924 LOG(WARNING) << "OnBootstrapTokenUpdated : " << bootstrap_token; | |
923 if (!sync_loop_) | 925 if (!sync_loop_) |
924 return; | 926 return; |
925 DCHECK_EQ(MessageLoop::current(), sync_loop_); | 927 DCHECK_EQ(MessageLoop::current(), sync_loop_); |
926 host_.Call( | 928 host_.Call( |
927 FROM_HERE, | 929 FROM_HERE, |
928 &SyncBackendHost::PersistEncryptionBootstrapToken, bootstrap_token); | 930 &SyncBackendHost::PersistEncryptionBootstrapToken, bootstrap_token); |
929 } | 931 } |
930 | 932 |
931 void SyncBackendHost::Core::OnStopSyncingPermanently() { | 933 void SyncBackendHost::Core::OnStopSyncingPermanently() { |
932 if (!sync_loop_) | 934 if (!sync_loop_) |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1422 FROM_HERE, | 1424 FROM_HERE, |
1423 base::Bind(&SyncBackendHost::Core::DoRefreshNigori, | 1425 base::Bind(&SyncBackendHost::Core::DoRefreshNigori, |
1424 core_.get(), sync_thread_done_callback)); | 1426 core_.get(), sync_thread_done_callback)); |
1425 } | 1427 } |
1426 | 1428 |
1427 #undef SDVLOG | 1429 #undef SDVLOG |
1428 | 1430 |
1429 #undef SLOG | 1431 #undef SLOG |
1430 | 1432 |
1431 } // namespace browser_sync | 1433 } // namespace browser_sync |
OLD | NEW |