| 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 "chrome/browser/sync/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1728 | 1728 |
| 1729 base::Time ProfileSyncService::GetExplicitPassphraseTime() const { | 1729 base::Time ProfileSyncService::GetExplicitPassphraseTime() const { |
| 1730 return backend_->GetExplicitPassphraseTime(); | 1730 return backend_->GetExplicitPassphraseTime(); |
| 1731 } | 1731 } |
| 1732 | 1732 |
| 1733 bool ProfileSyncService::IsCryptographerReady( | 1733 bool ProfileSyncService::IsCryptographerReady( |
| 1734 const syncer::BaseTransaction* trans) const { | 1734 const syncer::BaseTransaction* trans) const { |
| 1735 return backend_.get() && backend_->IsCryptographerReady(trans); | 1735 return backend_.get() && backend_->IsCryptographerReady(trans); |
| 1736 } | 1736 } |
| 1737 | 1737 |
| 1738 SyncBackendHost* ProfileSyncService::GetBackendForTest() { |
| 1739 // We don't check |backend_initialized_|; we assume the test class |
| 1740 // knows what it's doing. |
| 1741 return backend_.get(); |
| 1742 } |
| 1743 |
| 1738 void ProfileSyncService::ConfigurePriorityDataTypes() { | 1744 void ProfileSyncService::ConfigurePriorityDataTypes() { |
| 1739 const syncer::ModelTypeSet priority_types = | 1745 const syncer::ModelTypeSet priority_types = |
| 1740 Intersection(GetPreferredDataTypes(), syncer::PriorityUserTypes()); | 1746 Intersection(GetPreferredDataTypes(), syncer::PriorityUserTypes()); |
| 1741 if (!priority_types.Empty()) { | 1747 if (!priority_types.Empty()) { |
| 1742 const syncer::ConfigureReason reason = HasSyncSetupCompleted() ? | 1748 const syncer::ConfigureReason reason = HasSyncSetupCompleted() ? |
| 1743 syncer::CONFIGURE_REASON_RECONFIGURATION : | 1749 syncer::CONFIGURE_REASON_RECONFIGURATION : |
| 1744 syncer::CONFIGURE_REASON_NEW_CLIENT; | 1750 syncer::CONFIGURE_REASON_NEW_CLIENT; |
| 1745 data_type_manager_->Configure(priority_types, reason); | 1751 data_type_manager_->Configure(priority_types, reason); |
| 1746 } | 1752 } |
| 1747 } | 1753 } |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2254 SyncTokenStatus status; | 2260 SyncTokenStatus status; |
| 2255 status.connection_status_update_time = connection_status_update_time_; | 2261 status.connection_status_update_time = connection_status_update_time_; |
| 2256 status.connection_status = connection_status_; | 2262 status.connection_status = connection_status_; |
| 2257 status.token_request_time = token_request_time_; | 2263 status.token_request_time = token_request_time_; |
| 2258 status.token_receive_time = token_receive_time_; | 2264 status.token_receive_time = token_receive_time_; |
| 2259 status.last_get_token_error = last_get_token_error_; | 2265 status.last_get_token_error = last_get_token_error_; |
| 2260 if (request_access_token_retry_timer_.IsRunning()) | 2266 if (request_access_token_retry_timer_.IsRunning()) |
| 2261 status.next_token_request_time = next_token_request_time_; | 2267 status.next_token_request_time = next_token_request_time_; |
| 2262 return status; | 2268 return status; |
| 2263 } | 2269 } |
| OLD | NEW |