OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/file_version_info.h" | 7 #include "base/file_version_info.h" |
8 #include "base/task.h" | 8 #include "base/task.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/app/chrome_version_info.h" | 10 #include "chrome/app/chrome_version_info.h" |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 options.http_bridge_factory, | 396 options.http_bridge_factory, |
397 options.auth_http_bridge_factory, | 397 options.auth_http_bridge_factory, |
398 host_, // ModelSafeWorkerRegistrar. | 398 host_, // ModelSafeWorkerRegistrar. |
399 options.attempt_last_user_authentication, | 399 options.attempt_last_user_authentication, |
400 options.invalidate_sync_login, | 400 options.invalidate_sync_login, |
401 options.invalidate_sync_xmpp_login, | 401 options.invalidate_sync_xmpp_login, |
402 MakeUserAgentForSyncapi().c_str(), | 402 MakeUserAgentForSyncapi().c_str(), |
403 options.lsid.c_str(), | 403 options.lsid.c_str(), |
404 options.notification_method); | 404 options.notification_method); |
405 DCHECK(success) << "Syncapi initialization failed!"; | 405 DCHECK(success) << "Syncapi initialization failed!"; |
406 | |
407 // TODO(dantasse): this call is in a temporary position in order to enable | |
408 // the new sync setup/passphrase UI. http://crbug.com/45869 | |
409 DoStartSyncing(); | |
410 } | 406 } |
411 | 407 |
412 void SyncBackendHost::Core::DoAuthenticate(const std::string& username, | 408 void SyncBackendHost::Core::DoAuthenticate(const std::string& username, |
413 const std::string& password, | 409 const std::string& password, |
414 const std::string& captcha) { | 410 const std::string& captcha) { |
415 DCHECK(MessageLoop::current() == host_->core_thread_.message_loop()); | 411 DCHECK(MessageLoop::current() == host_->core_thread_.message_loop()); |
416 syncapi_->Authenticate(username.c_str(), password.c_str(), captcha.c_str()); | 412 syncapi_->Authenticate(username.c_str(), password.c_str(), captcha.c_str()); |
417 } | 413 } |
418 | 414 |
419 void SyncBackendHost::Core::DoStartSyncing() { | 415 void SyncBackendHost::Core::DoStartSyncing() { |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 } | 609 } |
614 | 610 |
615 void SyncBackendHost::Core::DeleteSyncDataFolder() { | 611 void SyncBackendHost::Core::DeleteSyncDataFolder() { |
616 if (file_util::DirectoryExists(host_->sync_data_folder_path())) { | 612 if (file_util::DirectoryExists(host_->sync_data_folder_path())) { |
617 if (!file_util::Delete(host_->sync_data_folder_path(), true)) | 613 if (!file_util::Delete(host_->sync_data_folder_path(), true)) |
618 LOG(DFATAL) << "Could not delete the Sync Data folder."; | 614 LOG(DFATAL) << "Could not delete the Sync Data folder."; |
619 } | 615 } |
620 } | 616 } |
621 | 617 |
622 } // namespace browser_sync | 618 } // namespace browser_sync |
OLD | NEW |