| 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 <cstddef> | 7 #include <cstddef> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 } | 1856 } |
| 1857 return registered_types; | 1857 return registered_types; |
| 1858 } | 1858 } |
| 1859 | 1859 |
| 1860 bool ProfileSyncService::IsUsingSecondaryPassphrase() const { | 1860 bool ProfileSyncService::IsUsingSecondaryPassphrase() const { |
| 1861 syncer::PassphraseType passphrase_type = GetPassphraseType(); | 1861 syncer::PassphraseType passphrase_type = GetPassphraseType(); |
| 1862 return passphrase_type == syncer::FROZEN_IMPLICIT_PASSPHRASE || | 1862 return passphrase_type == syncer::FROZEN_IMPLICIT_PASSPHRASE || |
| 1863 passphrase_type == syncer::CUSTOM_PASSPHRASE; | 1863 passphrase_type == syncer::CUSTOM_PASSPHRASE; |
| 1864 } | 1864 } |
| 1865 | 1865 |
| 1866 std::string ProfileSyncService::GetCustomPassphraseKey() const { |
| 1867 sync_driver::SystemEncryptor encryptor; |
| 1868 syncer::Cryptographer cryptographer(&encryptor); |
| 1869 cryptographer.Bootstrap(sync_prefs_.GetEncryptionBootstrapToken()); |
| 1870 return cryptographer.GetDefaultNigoriKeyData(); |
| 1871 } |
| 1872 |
| 1866 syncer::PassphraseType ProfileSyncService::GetPassphraseType() const { | 1873 syncer::PassphraseType ProfileSyncService::GetPassphraseType() const { |
| 1867 return backend_->GetPassphraseType(); | 1874 return backend_->GetPassphraseType(); |
| 1868 } | 1875 } |
| 1869 | 1876 |
| 1870 base::Time ProfileSyncService::GetExplicitPassphraseTime() const { | 1877 base::Time ProfileSyncService::GetExplicitPassphraseTime() const { |
| 1871 return backend_->GetExplicitPassphraseTime(); | 1878 return backend_->GetExplicitPassphraseTime(); |
| 1872 } | 1879 } |
| 1873 | 1880 |
| 1874 bool ProfileSyncService::IsCryptographerReady( | 1881 bool ProfileSyncService::IsCryptographerReady( |
| 1875 const syncer::BaseTransaction* trans) const { | 1882 const syncer::BaseTransaction* trans) const { |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2696 } | 2703 } |
| 2697 | 2704 |
| 2698 std::string ProfileSyncService::unrecoverable_error_message() const { | 2705 std::string ProfileSyncService::unrecoverable_error_message() const { |
| 2699 return unrecoverable_error_message_; | 2706 return unrecoverable_error_message_; |
| 2700 } | 2707 } |
| 2701 | 2708 |
| 2702 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() | 2709 tracked_objects::Location ProfileSyncService::unrecoverable_error_location() |
| 2703 const { | 2710 const { |
| 2704 return unrecoverable_error_location_; | 2711 return unrecoverable_error_location_; |
| 2705 } | 2712 } |
| OLD | NEW |