| 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 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1688 | 1688 |
| 1689 base::Time ProfileSyncService::GetExplicitPassphraseTime() const { | 1689 base::Time ProfileSyncService::GetExplicitPassphraseTime() const { |
| 1690 return backend_->GetExplicitPassphraseTime(); | 1690 return backend_->GetExplicitPassphraseTime(); |
| 1691 } | 1691 } |
| 1692 | 1692 |
| 1693 bool ProfileSyncService::IsCryptographerReady( | 1693 bool ProfileSyncService::IsCryptographerReady( |
| 1694 const syncer::BaseTransaction* trans) const { | 1694 const syncer::BaseTransaction* trans) const { |
| 1695 return backend_.get() && backend_->IsCryptographerReady(trans); | 1695 return backend_.get() && backend_->IsCryptographerReady(trans); |
| 1696 } | 1696 } |
| 1697 | 1697 |
| 1698 SyncBackendHost* ProfileSyncService::GetBackendForTest() { | |
| 1699 // We don't check |backend_initialized_|; we assume the test class | |
| 1700 // knows what it's doing. | |
| 1701 return backend_.get(); | |
| 1702 } | |
| 1703 | |
| 1704 void ProfileSyncService::ConfigurePriorityDataTypes() { | 1698 void ProfileSyncService::ConfigurePriorityDataTypes() { |
| 1705 const syncer::ModelTypeSet priority_types = | 1699 const syncer::ModelTypeSet priority_types = |
| 1706 Intersection(GetPreferredDataTypes(), syncer::PriorityUserTypes()); | 1700 Intersection(GetPreferredDataTypes(), syncer::PriorityUserTypes()); |
| 1707 if (!priority_types.Empty()) { | 1701 if (!priority_types.Empty()) { |
| 1708 const syncer::ConfigureReason reason = HasSyncSetupCompleted() ? | 1702 const syncer::ConfigureReason reason = HasSyncSetupCompleted() ? |
| 1709 syncer::CONFIGURE_REASON_RECONFIGURATION : | 1703 syncer::CONFIGURE_REASON_RECONFIGURATION : |
| 1710 syncer::CONFIGURE_REASON_NEW_CLIENT; | 1704 syncer::CONFIGURE_REASON_NEW_CLIENT; |
| 1711 data_type_manager_->Configure(priority_types, reason); | 1705 data_type_manager_->Configure(priority_types, reason); |
| 1712 } | 1706 } |
| 1713 } | 1707 } |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2216 SyncTokenStatus status; | 2210 SyncTokenStatus status; |
| 2217 status.connection_status_update_time = connection_status_update_time_; | 2211 status.connection_status_update_time = connection_status_update_time_; |
| 2218 status.connection_status = connection_status_; | 2212 status.connection_status = connection_status_; |
| 2219 status.token_request_time = token_request_time_; | 2213 status.token_request_time = token_request_time_; |
| 2220 status.token_receive_time = token_receive_time_; | 2214 status.token_receive_time = token_receive_time_; |
| 2221 status.last_get_token_error = last_get_token_error_; | 2215 status.last_get_token_error = last_get_token_error_; |
| 2222 if (request_access_token_retry_timer_.IsRunning()) | 2216 if (request_access_token_retry_timer_.IsRunning()) |
| 2223 status.next_token_request_time = next_token_request_time_; | 2217 status.next_token_request_time = next_token_request_time_; |
| 2224 return status; | 2218 return status; |
| 2225 } | 2219 } |
| OLD | NEW |