| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #include "content/public/browser/notification_service.h" | 72 #include "content/public/browser/notification_service.h" |
| 73 #include "content/public/browser/notification_source.h" | 73 #include "content/public/browser/notification_source.h" |
| 74 #include "google_apis/gaia/gaia_constants.h" | 74 #include "google_apis/gaia/gaia_constants.h" |
| 75 #include "grit/generated_resources.h" | 75 #include "grit/generated_resources.h" |
| 76 #include "net/cookies/cookie_monster.h" | 76 #include "net/cookies/cookie_monster.h" |
| 77 #include "net/url_request/url_request_context_getter.h" | 77 #include "net/url_request/url_request_context_getter.h" |
| 78 #include "sync/api/sync_error.h" | 78 #include "sync/api/sync_error.h" |
| 79 #include "sync/internal_api/public/configure_reason.h" | 79 #include "sync/internal_api/public/configure_reason.h" |
| 80 #include "sync/internal_api/public/http_bridge_network_resources.h" | 80 #include "sync/internal_api/public/http_bridge_network_resources.h" |
| 81 #include "sync/internal_api/public/network_resources.h" | 81 #include "sync/internal_api/public/network_resources.h" |
| 82 #include "sync/internal_api/public/sync_core_proxy.h" |
| 82 #include "sync/internal_api/public/sync_encryption_handler.h" | 83 #include "sync/internal_api/public/sync_encryption_handler.h" |
| 83 #include "sync/internal_api/public/util/experiments.h" | 84 #include "sync/internal_api/public/util/experiments.h" |
| 84 #include "sync/internal_api/public/util/sync_string_conversions.h" | 85 #include "sync/internal_api/public/util/sync_string_conversions.h" |
| 85 #include "sync/js/js_arg_list.h" | 86 #include "sync/js/js_arg_list.h" |
| 86 #include "sync/js/js_event_details.h" | 87 #include "sync/js/js_event_details.h" |
| 87 #include "sync/util/cryptographer.h" | 88 #include "sync/util/cryptographer.h" |
| 88 #include "ui/base/l10n/l10n_util.h" | 89 #include "ui/base/l10n/l10n_util.h" |
| 89 #include "ui/base/l10n/time_format.h" | 90 #include "ui/base/l10n/time_format.h" |
| 90 | 91 |
| 91 #if defined(ENABLE_MANAGED_USERS) | 92 #if defined(ENABLE_MANAGED_USERS) |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 339 |
| 339 void ProfileSyncService::UnregisterAuthNotifications() { | 340 void ProfileSyncService::UnregisterAuthNotifications() { |
| 340 if (signin()) | 341 if (signin()) |
| 341 signin()->RemoveObserver(this); | 342 signin()->RemoveObserver(this); |
| 342 oauth2_token_service_->RemoveObserver(this); | 343 oauth2_token_service_->RemoveObserver(this); |
| 343 } | 344 } |
| 344 | 345 |
| 345 void ProfileSyncService::RegisterDataTypeController( | 346 void ProfileSyncService::RegisterDataTypeController( |
| 346 DataTypeController* data_type_controller) { | 347 DataTypeController* data_type_controller) { |
| 347 DCHECK_EQ(data_type_controllers_.count(data_type_controller->type()), 0U); | 348 DCHECK_EQ(data_type_controllers_.count(data_type_controller->type()), 0U); |
| 349 DCHECK(!GetRegisteredNonBlockingDataTypes().Has( |
| 350 data_type_controller->type())); |
| 348 data_type_controllers_[data_type_controller->type()] = | 351 data_type_controllers_[data_type_controller->type()] = |
| 349 data_type_controller; | 352 data_type_controller; |
| 350 } | 353 } |
| 351 | 354 |
| 355 void ProfileSyncService::RegisterNonBlockingType(syncer::ModelType type) { |
| 356 DCHECK_EQ(data_type_controllers_.count(type), 0U); |
| 357 DCHECK(!GetRegisteredNonBlockingDataTypes().Has(type)); |
| 358 non_blocking_types_.Put(type); |
| 359 } |
| 360 |
| 352 browser_sync::SessionModelAssociator* | 361 browser_sync::SessionModelAssociator* |
| 353 ProfileSyncService::GetSessionModelAssociatorDeprecated() { | 362 ProfileSyncService::GetSessionModelAssociatorDeprecated() { |
| 354 if (!IsSessionsDataTypeControllerRunning()) | 363 if (!IsSessionsDataTypeControllerRunning()) |
| 355 return NULL; | 364 return NULL; |
| 356 | 365 |
| 357 // If we're using sessions V2, there's no model associator. | 366 // If we're using sessions V2, there's no model associator. |
| 358 if (sessions_sync_manager_.get()) | 367 if (sessions_sync_manager_.get()) |
| 359 return NULL; | 368 return NULL; |
| 360 | 369 |
| 361 return static_cast<browser_sync::SessionDataTypeController*>( | 370 return static_cast<browser_sync::SessionDataTypeController*>( |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 | 941 |
| 933 backend_initialized_ = true; | 942 backend_initialized_ = true; |
| 934 | 943 |
| 935 sync_js_controller_.AttachJsBackend(js_backend); | 944 sync_js_controller_.AttachJsBackend(js_backend); |
| 936 debug_info_listener_ = debug_info_listener; | 945 debug_info_listener_ = debug_info_listener; |
| 937 | 946 |
| 938 if (protocol_event_observers_.might_have_observers()) { | 947 if (protocol_event_observers_.might_have_observers()) { |
| 939 backend_->RequestBufferedProtocolEventsAndEnableForwarding(); | 948 backend_->RequestBufferedProtocolEventsAndEnableForwarding(); |
| 940 } | 949 } |
| 941 | 950 |
| 951 syncer::SyncCoreProxy sync_core_proxy_ = backend_->GetSyncCoreProxy(); |
| 952 |
| 942 // If we have a cached passphrase use it to decrypt/encrypt data now that the | 953 // If we have a cached passphrase use it to decrypt/encrypt data now that the |
| 943 // backend is initialized. We want to call this before notifying observers in | 954 // backend is initialized. We want to call this before notifying observers in |
| 944 // case this operation affects the "passphrase required" status. | 955 // case this operation affects the "passphrase required" status. |
| 945 ConsumeCachedPassphraseIfPossible(); | 956 ConsumeCachedPassphraseIfPossible(); |
| 946 | 957 |
| 947 // The very first time the backend initializes is effectively the first time | 958 // The very first time the backend initializes is effectively the first time |
| 948 // we can say we successfully "synced". last_synced_time_ will only be null | 959 // we can say we successfully "synced". last_synced_time_ will only be null |
| 949 // in this case, because the pref wasn't restored on StartUp. | 960 // in this case, because the pref wasn't restored on StartUp. |
| 950 if (last_synced_time_.is_null()) { | 961 if (last_synced_time_.is_null()) { |
| 951 UpdateLastSyncedTime(); | 962 UpdateLastSyncedTime(); |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 if (HasUnrecoverableError()) { | 1217 if (HasUnrecoverableError()) { |
| 1207 // When unrecoverable error is detected we post a task to shutdown the | 1218 // When unrecoverable error is detected we post a task to shutdown the |
| 1208 // backend. The task might not have executed yet. | 1219 // backend. The task might not have executed yet. |
| 1209 return; | 1220 return; |
| 1210 } | 1221 } |
| 1211 | 1222 |
| 1212 DVLOG(1) << "Passphrase required with reason: " | 1223 DVLOG(1) << "Passphrase required with reason: " |
| 1213 << syncer::PassphraseRequiredReasonToString(reason); | 1224 << syncer::PassphraseRequiredReasonToString(reason); |
| 1214 passphrase_required_reason_ = reason; | 1225 passphrase_required_reason_ = reason; |
| 1215 | 1226 |
| 1216 const syncer::ModelTypeSet types = GetPreferredDataTypes(); | 1227 const syncer::ModelTypeSet types = GetPreferredDirectoryDataTypes(); |
| 1217 if (data_type_manager_) { | 1228 if (data_type_manager_) { |
| 1218 // Reconfigure without the encrypted types (excluded implicitly via the | 1229 // Reconfigure without the encrypted types (excluded implicitly via the |
| 1219 // failed datatypes handler). | 1230 // failed datatypes handler). |
| 1220 data_type_manager_->Configure(types, | 1231 data_type_manager_->Configure(types, |
| 1221 syncer::CONFIGURE_REASON_CRYPTO); | 1232 syncer::CONFIGURE_REASON_CRYPTO); |
| 1222 } | 1233 } |
| 1223 | 1234 |
| 1235 // TODO(rlarocque): Support non-blocking types. http://crbug.com/351005. |
| 1236 |
| 1224 // Notify observers that the passphrase status may have changed. | 1237 // Notify observers that the passphrase status may have changed. |
| 1225 NotifyObservers(); | 1238 NotifyObservers(); |
| 1226 } | 1239 } |
| 1227 | 1240 |
| 1228 void ProfileSyncService::OnPassphraseAccepted() { | 1241 void ProfileSyncService::OnPassphraseAccepted() { |
| 1229 DVLOG(1) << "Received OnPassphraseAccepted."; | 1242 DVLOG(1) << "Received OnPassphraseAccepted."; |
| 1230 | 1243 |
| 1231 // If the pending keys were resolved via keystore, it's possible we never | 1244 // If the pending keys were resolved via keystore, it's possible we never |
| 1232 // consumed our cached passphrase. Clear it now. | 1245 // consumed our cached passphrase. Clear it now. |
| 1233 if (!cached_passphrase_.empty()) | 1246 if (!cached_passphrase_.empty()) |
| 1234 cached_passphrase_.clear(); | 1247 cached_passphrase_.clear(); |
| 1235 | 1248 |
| 1236 // Reset passphrase_required_reason_ since we know we no longer require the | 1249 // Reset passphrase_required_reason_ since we know we no longer require the |
| 1237 // passphrase. We do this here rather than down in ResolvePassphraseRequired() | 1250 // passphrase. We do this here rather than down in ResolvePassphraseRequired() |
| 1238 // because that can be called by OnPassphraseRequired() if no encrypted data | 1251 // because that can be called by OnPassphraseRequired() if no encrypted data |
| 1239 // types are enabled, and we don't want to clobber the true passphrase error. | 1252 // types are enabled, and we don't want to clobber the true passphrase error. |
| 1240 passphrase_required_reason_ = syncer::REASON_PASSPHRASE_NOT_REQUIRED; | 1253 passphrase_required_reason_ = syncer::REASON_PASSPHRASE_NOT_REQUIRED; |
| 1241 | 1254 |
| 1242 // Make sure the data types that depend on the passphrase are started at | 1255 // Make sure the data types that depend on the passphrase are started at |
| 1243 // this time. | 1256 // this time. |
| 1244 const syncer::ModelTypeSet types = GetPreferredDataTypes(); | 1257 const syncer::ModelTypeSet types = GetPreferredDirectoryDataTypes(); |
| 1245 if (data_type_manager_) { | 1258 if (data_type_manager_) { |
| 1246 // Re-enable any encrypted types if necessary. | 1259 // Re-enable any encrypted types if necessary. |
| 1247 data_type_manager_->Configure(types, | 1260 data_type_manager_->Configure(types, |
| 1248 syncer::CONFIGURE_REASON_CRYPTO); | 1261 syncer::CONFIGURE_REASON_CRYPTO); |
| 1249 } | 1262 } |
| 1250 | 1263 |
| 1264 // TODO(rlarocque): Support non-blocking types. http://crbug.com/351005. |
| 1265 |
| 1251 NotifyObservers(); | 1266 NotifyObservers(); |
| 1252 } | 1267 } |
| 1253 | 1268 |
| 1254 void ProfileSyncService::OnEncryptedTypesChanged( | 1269 void ProfileSyncService::OnEncryptedTypesChanged( |
| 1255 syncer::ModelTypeSet encrypted_types, | 1270 syncer::ModelTypeSet encrypted_types, |
| 1256 bool encrypt_everything) { | 1271 bool encrypt_everything) { |
| 1257 encrypted_types_ = encrypted_types; | 1272 encrypted_types_ = encrypted_types; |
| 1258 encrypt_everything_ = encrypt_everything; | 1273 encrypt_everything_ = encrypt_everything; |
| 1259 DVLOG(1) << "Encrypted types changed to " | 1274 DVLOG(1) << "Encrypted types changed to " |
| 1260 << syncer::ModelTypeSetToString(encrypted_types_) | 1275 << syncer::ModelTypeSetToString(encrypted_types_) |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1667 return Difference(preferred_types, failed_types); | 1682 return Difference(preferred_types, failed_types); |
| 1668 } | 1683 } |
| 1669 | 1684 |
| 1670 syncer::ModelTypeSet ProfileSyncService::GetPreferredDataTypes() const { | 1685 syncer::ModelTypeSet ProfileSyncService::GetPreferredDataTypes() const { |
| 1671 const syncer::ModelTypeSet registered_types = GetRegisteredDataTypes(); | 1686 const syncer::ModelTypeSet registered_types = GetRegisteredDataTypes(); |
| 1672 const syncer::ModelTypeSet preferred_types = | 1687 const syncer::ModelTypeSet preferred_types = |
| 1673 sync_prefs_.GetPreferredDataTypes(registered_types); | 1688 sync_prefs_.GetPreferredDataTypes(registered_types); |
| 1674 return preferred_types; | 1689 return preferred_types; |
| 1675 } | 1690 } |
| 1676 | 1691 |
| 1692 syncer::ModelTypeSet |
| 1693 ProfileSyncService::GetPreferredDirectoryDataTypes() const { |
| 1694 const syncer::ModelTypeSet registered_directory_types = |
| 1695 GetRegisteredDirectoryDataTypes(); |
| 1696 const syncer::ModelTypeSet preferred_types = |
| 1697 sync_prefs_.GetPreferredDataTypes(registered_directory_types); |
| 1698 return preferred_types; |
| 1699 } |
| 1700 |
| 1701 syncer::ModelTypeSet |
| 1702 ProfileSyncService::GetPreferredNonBlockingDataTypes() const { |
| 1703 return sync_prefs_.GetPreferredDataTypes(GetRegisteredNonBlockingDataTypes()); |
| 1704 } |
| 1705 |
| 1677 syncer::ModelTypeSet ProfileSyncService::GetRegisteredDataTypes() const { | 1706 syncer::ModelTypeSet ProfileSyncService::GetRegisteredDataTypes() const { |
| 1707 return Union(GetRegisteredDirectoryDataTypes(), |
| 1708 GetRegisteredNonBlockingDataTypes()); |
| 1709 } |
| 1710 |
| 1711 syncer::ModelTypeSet |
| 1712 ProfileSyncService::GetRegisteredDirectoryDataTypes() const { |
| 1678 syncer::ModelTypeSet registered_types; | 1713 syncer::ModelTypeSet registered_types; |
| 1679 // The data_type_controllers_ are determined by command-line flags; that's | 1714 // The data_type_controllers_ are determined by command-line flags; that's |
| 1680 // effectively what controls the values returned here. | 1715 // effectively what controls the values returned here. |
| 1681 for (DataTypeController::TypeMap::const_iterator it = | 1716 for (DataTypeController::TypeMap::const_iterator it = |
| 1682 data_type_controllers_.begin(); | 1717 data_type_controllers_.begin(); |
| 1683 it != data_type_controllers_.end(); ++it) { | 1718 it != data_type_controllers_.end(); ++it) { |
| 1684 registered_types.Put(it->first); | 1719 registered_types.Put(it->first); |
| 1685 } | 1720 } |
| 1686 return registered_types; | 1721 return registered_types; |
| 1687 } | 1722 } |
| 1688 | 1723 |
| 1724 syncer::ModelTypeSet |
| 1725 ProfileSyncService::GetRegisteredNonBlockingDataTypes() const { |
| 1726 return non_blocking_types_; |
| 1727 } |
| 1728 |
| 1689 bool ProfileSyncService::IsUsingSecondaryPassphrase() const { | 1729 bool ProfileSyncService::IsUsingSecondaryPassphrase() const { |
| 1690 syncer::PassphraseType passphrase_type = GetPassphraseType(); | 1730 syncer::PassphraseType passphrase_type = GetPassphraseType(); |
| 1691 return passphrase_type == syncer::FROZEN_IMPLICIT_PASSPHRASE || | 1731 return passphrase_type == syncer::FROZEN_IMPLICIT_PASSPHRASE || |
| 1692 passphrase_type == syncer::CUSTOM_PASSPHRASE; | 1732 passphrase_type == syncer::CUSTOM_PASSPHRASE; |
| 1693 } | 1733 } |
| 1694 | 1734 |
| 1695 syncer::PassphraseType ProfileSyncService::GetPassphraseType() const { | 1735 syncer::PassphraseType ProfileSyncService::GetPassphraseType() const { |
| 1696 return backend_->GetPassphraseType(); | 1736 return backend_->GetPassphraseType(); |
| 1697 } | 1737 } |
| 1698 | 1738 |
| 1699 base::Time ProfileSyncService::GetExplicitPassphraseTime() const { | 1739 base::Time ProfileSyncService::GetExplicitPassphraseTime() const { |
| 1700 return backend_->GetExplicitPassphraseTime(); | 1740 return backend_->GetExplicitPassphraseTime(); |
| 1701 } | 1741 } |
| 1702 | 1742 |
| 1703 bool ProfileSyncService::IsCryptographerReady( | 1743 bool ProfileSyncService::IsCryptographerReady( |
| 1704 const syncer::BaseTransaction* trans) const { | 1744 const syncer::BaseTransaction* trans) const { |
| 1705 return backend_.get() && backend_->IsCryptographerReady(trans); | 1745 return backend_.get() && backend_->IsCryptographerReady(trans); |
| 1706 } | 1746 } |
| 1707 | 1747 |
| 1708 void ProfileSyncService::ConfigurePriorityDataTypes() { | 1748 void ProfileSyncService::ConfigurePriorityDataTypes() { |
| 1709 const syncer::ModelTypeSet priority_types = | 1749 const syncer::ModelTypeSet priority_types = |
| 1710 Intersection(GetPreferredDataTypes(), syncer::PriorityUserTypes()); | 1750 Intersection(GetPreferredDirectoryDataTypes(), |
| 1751 syncer::PriorityUserTypes()); |
| 1711 if (!priority_types.Empty()) { | 1752 if (!priority_types.Empty()) { |
| 1712 const syncer::ConfigureReason reason = HasSyncSetupCompleted() ? | 1753 const syncer::ConfigureReason reason = HasSyncSetupCompleted() ? |
| 1713 syncer::CONFIGURE_REASON_RECONFIGURATION : | 1754 syncer::CONFIGURE_REASON_RECONFIGURATION : |
| 1714 syncer::CONFIGURE_REASON_NEW_CLIENT; | 1755 syncer::CONFIGURE_REASON_NEW_CLIENT; |
| 1715 data_type_manager_->Configure(priority_types, reason); | 1756 data_type_manager_->Configure(priority_types, reason); |
| 1716 } | 1757 } |
| 1717 } | 1758 } |
| 1718 | 1759 |
| 1719 void ProfileSyncService::ConfigureDataTypeManager() { | 1760 void ProfileSyncService::ConfigureDataTypeManager() { |
| 1720 // Don't configure datatypes if the setup UI is still on the screen - this | 1761 // Don't configure datatypes if the setup UI is still on the screen - this |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1738 | 1779 |
| 1739 // We create the migrator at the same time. | 1780 // We create the migrator at the same time. |
| 1740 migrator_.reset( | 1781 migrator_.reset( |
| 1741 new browser_sync::BackendMigrator( | 1782 new browser_sync::BackendMigrator( |
| 1742 profile_->GetDebugName(), GetUserShare(), | 1783 profile_->GetDebugName(), GetUserShare(), |
| 1743 this, data_type_manager_.get(), | 1784 this, data_type_manager_.get(), |
| 1744 base::Bind(&ProfileSyncService::StartSyncingWithServer, | 1785 base::Bind(&ProfileSyncService::StartSyncingWithServer, |
| 1745 base::Unretained(this)))); | 1786 base::Unretained(this)))); |
| 1746 } | 1787 } |
| 1747 | 1788 |
| 1748 const syncer::ModelTypeSet types = GetPreferredDataTypes(); | 1789 const syncer::ModelTypeSet types = GetPreferredDirectoryDataTypes(); |
| 1749 syncer::ConfigureReason reason = syncer::CONFIGURE_REASON_UNKNOWN; | 1790 syncer::ConfigureReason reason = syncer::CONFIGURE_REASON_UNKNOWN; |
| 1750 if (!HasSyncSetupCompleted()) { | 1791 if (!HasSyncSetupCompleted()) { |
| 1751 reason = syncer::CONFIGURE_REASON_NEW_CLIENT; | 1792 reason = syncer::CONFIGURE_REASON_NEW_CLIENT; |
| 1752 } else if (restart) { | 1793 } else if (restart) { |
| 1753 // Datatype downloads on restart are generally due to newly supported | 1794 // Datatype downloads on restart are generally due to newly supported |
| 1754 // datatypes (although it's also possible we're picking up where a failed | 1795 // datatypes (although it's also possible we're picking up where a failed |
| 1755 // previous configuration left off). | 1796 // previous configuration left off). |
| 1756 // TODO(sync): consider detecting configuration recovery and setting | 1797 // TODO(sync): consider detecting configuration recovery and setting |
| 1757 // the reason here appropriately. | 1798 // the reason here appropriately. |
| 1758 reason = syncer::CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE; | 1799 reason = syncer::CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 type_status->SetString("value", error_text); | 1896 type_status->SetString("value", error_text); |
| 1856 } else if (throttled_types.Has(type) && passive_types.Has(type)) { | 1897 } else if (throttled_types.Has(type) && passive_types.Has(type)) { |
| 1857 type_status->SetString("status", "warning"); | 1898 type_status->SetString("status", "warning"); |
| 1858 type_status->SetString("value", "Passive, Throttled"); | 1899 type_status->SetString("value", "Passive, Throttled"); |
| 1859 } else if (passive_types.Has(type)) { | 1900 } else if (passive_types.Has(type)) { |
| 1860 type_status->SetString("status", "warning"); | 1901 type_status->SetString("status", "warning"); |
| 1861 type_status->SetString("value", "Passive"); | 1902 type_status->SetString("value", "Passive"); |
| 1862 } else if (throttled_types.Has(type)) { | 1903 } else if (throttled_types.Has(type)) { |
| 1863 type_status->SetString("status", "warning"); | 1904 type_status->SetString("status", "warning"); |
| 1864 type_status->SetString("value", "Throttled"); | 1905 type_status->SetString("value", "Throttled"); |
| 1906 } else if (GetRegisteredNonBlockingDataTypes().Has(type)) { |
| 1907 type_status->SetString("status", "ok"); |
| 1908 type_status->SetString("value", "Non-Blocking"); |
| 1865 } else if (active_types.Has(type)) { | 1909 } else if (active_types.Has(type)) { |
| 1866 type_status->SetString("status", "ok"); | 1910 type_status->SetString("status", "ok"); |
| 1867 type_status->SetString("value", "Active: " + | 1911 type_status->SetString("value", "Active: " + |
| 1868 ModelSafeGroupToString(routing_info[type])); | 1912 ModelSafeGroupToString(routing_info[type])); |
| 1869 } else { | 1913 } else { |
| 1870 type_status->SetString("status", "warning"); | 1914 type_status->SetString("status", "warning"); |
| 1871 type_status->SetString("value", "Disabled by User"); | 1915 type_status->SetString("value", "Disabled by User"); |
| 1872 } | 1916 } |
| 1873 | 1917 |
| 1874 int live_count = detailed_status.num_entries_by_type[type] - | 1918 int live_count = detailed_status.num_entries_by_type[type] - |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2215 status.last_get_token_error = last_get_token_error_; | 2259 status.last_get_token_error = last_get_token_error_; |
| 2216 if (request_access_token_retry_timer_.IsRunning()) | 2260 if (request_access_token_retry_timer_.IsRunning()) |
| 2217 status.next_token_request_time = next_token_request_time_; | 2261 status.next_token_request_time = next_token_request_time_; |
| 2218 return status; | 2262 return status; |
| 2219 } | 2263 } |
| 2220 | 2264 |
| 2221 void ProfileSyncService::OverrideNetworkResourcesForTest( | 2265 void ProfileSyncService::OverrideNetworkResourcesForTest( |
| 2222 scoped_ptr<syncer::NetworkResources> network_resources) { | 2266 scoped_ptr<syncer::NetworkResources> network_resources) { |
| 2223 network_resources_ = network_resources.Pass(); | 2267 network_resources_ = network_resources.Pass(); |
| 2224 } | 2268 } |
| OLD | NEW |