Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 9323015: [Sync] - In about:sync page display if the first sync after restart has taken place or not. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 const GoogleServiceAuthError& ProfileSyncService::GetAuthError() const { 1030 const GoogleServiceAuthError& ProfileSyncService::GetAuthError() const {
1031 return last_auth_error_; 1031 return last_auth_error_;
1032 } 1032 }
1033 1033
1034 bool ProfileSyncService::SetupInProgress() const { 1034 bool ProfileSyncService::SetupInProgress() const {
1035 return !HasSyncSetupCompleted() && WizardIsVisible(); 1035 return !HasSyncSetupCompleted() && WizardIsVisible();
1036 } 1036 }
1037 1037
1038 std::string ProfileSyncService::BuildSyncStatusSummaryText( 1038 std::string ProfileSyncService::BuildSyncStatusSummaryText(
1039 const sync_api::SyncManager::Status::Summary& summary) { 1039 const sync_api::SyncManager::Status::Summary& summary) {
1040 const char* strings[] = {"INVALID", "OFFLINE", "OFFLINE_UNSYNCED", "SYNCING", 1040 const char* strings[] = {"INVALID", "READY", "OFFLINE", "OFFLINE_UNSYNCED",
rlarocque 2012/02/08 00:07:37 This is much more clever than it ought to be. No
1041 "READY", "OFFLINE_UNUSABLE"}; 1041 "SYNCING", "READY", "OFFLINE_UNUSABLE"};
1042 COMPILE_ASSERT(arraysize(strings) == 1042 COMPILE_ASSERT(arraysize(strings) ==
1043 sync_api::SyncManager::Status::SUMMARY_STATUS_COUNT, 1043 sync_api::SyncManager::Status::SUMMARY_STATUS_COUNT,
1044 enum_indexed_array); 1044 enum_indexed_array);
1045 if (summary < 0 || 1045 if (summary < 0 ||
1046 summary >= sync_api::SyncManager::Status::SUMMARY_STATUS_COUNT) { 1046 summary >= sync_api::SyncManager::Status::SUMMARY_STATUS_COUNT) {
1047 LOG(DFATAL) << "Illegal Summary Value: " << summary; 1047 LOG(DFATAL) << "Illegal Summary Value: " << summary;
1048 return "UNKNOWN"; 1048 return "UNKNOWN";
1049 } 1049 }
1050 return strings[summary]; 1050 return strings[summary];
1051 } 1051 }
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 << "Unrecoverable error."; 1598 << "Unrecoverable error.";
1599 } else { 1599 } else {
1600 DVLOG(0) << "ConfigureDataTypeManager not invoked because backend is not " 1600 DVLOG(0) << "ConfigureDataTypeManager not invoked because backend is not "
1601 << "initialized"; 1601 << "initialized";
1602 } 1602 }
1603 } 1603 }
1604 1604
1605 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() { 1605 const FailedDatatypesHandler& ProfileSyncService::failed_datatypes_handler() {
1606 return failed_datatypes_handler_; 1606 return failed_datatypes_handler_;
1607 } 1607 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698