| 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 "components/browser_sync/browser/profile_sync_service.h" | 5 #include "components/browser_sync/browser/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cstddef> | 9 #include <cstddef> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1724 for (DataTypeController::TypeMap::const_iterator it = | 1724 for (DataTypeController::TypeMap::const_iterator it = |
| 1725 data_type_controllers_.begin(); | 1725 data_type_controllers_.begin(); |
| 1726 it != data_type_controllers_.end(); ++it) { | 1726 it != data_type_controllers_.end(); ++it) { |
| 1727 registered_types.Put(it->first); | 1727 registered_types.Put(it->first); |
| 1728 } | 1728 } |
| 1729 return registered_types; | 1729 return registered_types; |
| 1730 } | 1730 } |
| 1731 | 1731 |
| 1732 bool ProfileSyncService::IsUsingSecondaryPassphrase() const { | 1732 bool ProfileSyncService::IsUsingSecondaryPassphrase() const { |
| 1733 syncer::PassphraseType passphrase_type = GetPassphraseType(); | 1733 syncer::PassphraseType passphrase_type = GetPassphraseType(); |
| 1734 return passphrase_type == syncer::FROZEN_IMPLICIT_PASSPHRASE || | 1734 return passphrase_type == |
| 1735 passphrase_type == syncer::CUSTOM_PASSPHRASE; | 1735 syncer::PassphraseType::FROZEN_IMPLICIT_PASSPHRASE || |
| 1736 passphrase_type == syncer::PassphraseType::CUSTOM_PASSPHRASE; |
| 1736 } | 1737 } |
| 1737 | 1738 |
| 1738 std::string ProfileSyncService::GetCustomPassphraseKey() const { | 1739 std::string ProfileSyncService::GetCustomPassphraseKey() const { |
| 1739 sync_driver::SystemEncryptor encryptor; | 1740 sync_driver::SystemEncryptor encryptor; |
| 1740 syncer::Cryptographer cryptographer(&encryptor); | 1741 syncer::Cryptographer cryptographer(&encryptor); |
| 1741 cryptographer.Bootstrap(sync_prefs_.GetEncryptionBootstrapToken()); | 1742 cryptographer.Bootstrap(sync_prefs_.GetEncryptionBootstrapToken()); |
| 1742 return cryptographer.GetDefaultNigoriKeyData(); | 1743 return cryptographer.GetDefaultNigoriKeyData(); |
| 1743 } | 1744 } |
| 1744 | 1745 |
| 1745 syncer::PassphraseType ProfileSyncService::GetPassphraseType() const { | 1746 syncer::PassphraseType ProfileSyncService::GetPassphraseType() const { |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2535 if (--outstanding_setup_in_progress_handles_ != 0) | 2536 if (--outstanding_setup_in_progress_handles_ != 0) |
| 2536 return; | 2537 return; |
| 2537 | 2538 |
| 2538 DCHECK(startup_controller_->IsSetupInProgress()); | 2539 DCHECK(startup_controller_->IsSetupInProgress()); |
| 2539 startup_controller_->SetSetupInProgress(false); | 2540 startup_controller_->SetSetupInProgress(false); |
| 2540 | 2541 |
| 2541 if (IsBackendInitialized()) | 2542 if (IsBackendInitialized()) |
| 2542 ReconfigureDatatypeManager(); | 2543 ReconfigureDatatypeManager(); |
| 2543 NotifyObservers(); | 2544 NotifyObservers(); |
| 2544 } | 2545 } |
| OLD | NEW |