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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 return last_auth_error_; | 1009 return last_auth_error_; |
1010 } | 1010 } |
1011 | 1011 |
1012 bool ProfileSyncService::SetupInProgress() const { | 1012 bool ProfileSyncService::SetupInProgress() const { |
1013 return !HasSyncSetupCompleted() && WizardIsVisible(); | 1013 return !HasSyncSetupCompleted() && WizardIsVisible(); |
1014 } | 1014 } |
1015 | 1015 |
1016 std::string ProfileSyncService::BuildSyncStatusSummaryText( | 1016 std::string ProfileSyncService::BuildSyncStatusSummaryText( |
1017 const sync_api::SyncManager::Status::Summary& summary) { | 1017 const sync_api::SyncManager::Status::Summary& summary) { |
1018 const char* strings[] = {"INVALID", "OFFLINE", "OFFLINE_UNSYNCED", "SYNCING", | 1018 const char* strings[] = {"INVALID", "OFFLINE", "OFFLINE_UNSYNCED", "SYNCING", |
1019 "READY", "CONFLICT", "OFFLINE_UNUSABLE"}; | 1019 "READY", "OFFLINE_UNUSABLE"}; |
1020 COMPILE_ASSERT(arraysize(strings) == | 1020 COMPILE_ASSERT(arraysize(strings) == |
1021 sync_api::SyncManager::Status::SUMMARY_STATUS_COUNT, | 1021 sync_api::SyncManager::Status::SUMMARY_STATUS_COUNT, |
1022 enum_indexed_array); | 1022 enum_indexed_array); |
1023 if (summary < 0 || | 1023 if (summary < 0 || |
1024 summary >= sync_api::SyncManager::Status::SUMMARY_STATUS_COUNT) { | 1024 summary >= sync_api::SyncManager::Status::SUMMARY_STATUS_COUNT) { |
1025 LOG(DFATAL) << "Illegal Summary Value: " << summary; | 1025 LOG(DFATAL) << "Illegal Summary Value: " << summary; |
1026 return "UNKNOWN"; | 1026 return "UNKNOWN"; |
1027 } | 1027 } |
1028 return strings[summary]; | 1028 return strings[summary]; |
1029 } | 1029 } |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1556 << "Unrecoverable error."; | 1556 << "Unrecoverable error."; |
1557 } else { | 1557 } else { |
1558 DVLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " | 1558 DVLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " |
1559 << "initialized"; | 1559 << "initialized"; |
1560 } | 1560 } |
1561 } | 1561 } |
1562 | 1562 |
1563 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { | 1563 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { |
1564 return failed_datatypes_handler_; | 1564 return failed_datatypes_handler_; |
1565 } | 1565 } |
OLD | NEW |