OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 return last_auth_error_; | 1002 return last_auth_error_; |
1003 } | 1003 } |
1004 | 1004 |
1005 bool ProfileSyncService::SetupInProgress() const { | 1005 bool ProfileSyncService::SetupInProgress() const { |
1006 return !HasSyncSetupCompleted() && WizardIsVisible(); | 1006 return !HasSyncSetupCompleted() && WizardIsVisible(); |
1007 } | 1007 } |
1008 | 1008 |
1009 std::string ProfileSyncService::BuildSyncStatusSummaryText( | 1009 std::string ProfileSyncService::BuildSyncStatusSummaryText( |
1010 const sync_api::SyncManager::Status::Summary& summary) { | 1010 const sync_api::SyncManager::Status::Summary& summary) { |
1011 const char* strings[] = {"INVALID", "OFFLINE", "OFFLINE_UNSYNCED", "SYNCING", | 1011 const char* strings[] = {"INVALID", "OFFLINE", "OFFLINE_UNSYNCED", "SYNCING", |
1012 "READY", "CONFLICT", "OFFLINE_UNUSABLE"}; | 1012 "READY", "OFFLINE_UNUSABLE"}; |
1013 COMPILE_ASSERT(arraysize(strings) == | 1013 COMPILE_ASSERT(arraysize(strings) == |
1014 sync_api::SyncManager::Status::SUMMARY_STATUS_COUNT, | 1014 sync_api::SyncManager::Status::SUMMARY_STATUS_COUNT, |
1015 enum_indexed_array); | 1015 enum_indexed_array); |
1016 if (summary < 0 || | 1016 if (summary < 0 || |
1017 summary >= sync_api::SyncManager::Status::SUMMARY_STATUS_COUNT) { | 1017 summary >= sync_api::SyncManager::Status::SUMMARY_STATUS_COUNT) { |
1018 LOG(DFATAL) << "Illegal Summary Value: " << summary; | 1018 LOG(DFATAL) << "Illegal Summary Value: " << summary; |
1019 return "UNKNOWN"; | 1019 return "UNKNOWN"; |
1020 } | 1020 } |
1021 return strings[summary]; | 1021 return strings[summary]; |
1022 } | 1022 } |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1566 << "Unrecoverable error."; | 1566 << "Unrecoverable error."; |
1567 } else { | 1567 } else { |
1568 DVLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " | 1568 DVLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " |
1569 << "initialized"; | 1569 << "initialized"; |
1570 } | 1570 } |
1571 } | 1571 } |
1572 | 1572 |
1573 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { | 1573 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { |
1574 return failed_datatypes_handler_; | 1574 return failed_datatypes_handler_; |
1575 } | 1575 } |
OLD | NEW |