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

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

Issue 10335015: Treat SyncCredentialsLost as an auth error (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try Created 8 years, 7 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/sync_ui_util.h" 5 #include "chrome/browser/sync/sync_ui_util.h"
6 6
7 #include "base/i18n/number_formatting.h" 7 #include "base/i18n/number_formatting.h"
8 #include "base/i18n/time_formatting.h" 8 #include "base/i18n/time_formatting.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 sync_ui_util::AddStringSyncDetails(version_info, "Server URL", 544 sync_ui_util::AddStringSyncDetails(version_info, "Server URL",
545 service->sync_service_url().spec()); 545 service->sync_service_url().spec());
546 546
547 ListValue* user_state = AddSyncDetailsSection(details, "Credentials"); 547 ListValue* user_state = AddSyncDetailsSection(details, "Credentials");
548 sync_ui_util::AddStringSyncDetails(user_state, "Client ID", 548 sync_ui_util::AddStringSyncDetails(user_state, "Client ID",
549 full_status.unique_id.empty() ? "none" : full_status.unique_id); 549 full_status.unique_id.empty() ? "none" : full_status.unique_id);
550 sync_ui_util::AddStringSyncDetails( 550 sync_ui_util::AddStringSyncDetails(
551 user_state, "Username", 551 user_state, "Username",
552 service->signin() ? service->signin()->GetAuthenticatedUsername() : ""); 552 service->signin() ? service->signin()->GetAuthenticatedUsername() : "");
553 sync_ui_util::AddBoolSyncDetail( 553 sync_ui_util::AddBoolSyncDetail(
554 user_state, "Sync Token Available", service->AreCredentialsAvailable()); 554 user_state, "Sync Token Available", service->IsSyncTokenAvailable());
555 555
556 ListValue* local_state = AddSyncDetailsSection(details, "Local State"); 556 ListValue* local_state = AddSyncDetailsSection(details, "Local State");
557 sync_ui_util::AddStringSyncDetails(local_state, "Last Synced", 557 sync_ui_util::AddStringSyncDetails(local_state, "Last Synced",
558 service->GetLastSyncedTimeString()); 558 service->GetLastSyncedTimeString());
559 559
560 // Some global status indicators. These will change only in exceptional 560 // Some global status indicators. These will change only in exceptional
561 // circumstances, like encryption changes, new data types, throttling, etc. 561 // circumstances, like encryption changes, new data types, throttling, etc.
562 sync_ui_util::AddBoolSyncDetail(local_state, 562 sync_ui_util::AddBoolSyncDetail(local_state,
563 "Sync First-Time Setup Complete", 563 "Sync First-Time Setup Complete",
564 service->HasSyncSetupCompleted()); 564 service->HasSyncSetupCompleted());
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 } 787 }
788 } else { 788 } else {
789 version_modifier = " " + version_modifier; 789 version_modifier = " " + version_modifier;
790 } 790 }
791 return chrome_version.Name() + " " + chrome_version.OSType() + " " + 791 return chrome_version.Name() + " " + chrome_version.OSType() + " " +
792 chrome_version.Version() + " (" + chrome_version.LastChange() + ")" + 792 chrome_version.Version() + " (" + chrome_version.LastChange() + ")" +
793 version_modifier; 793 version_modifier;
794 } 794 }
795 795
796 } // namespace sync_ui_util 796 } // namespace sync_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_mock.h ('k') | chrome/browser/ui/webui/options2/browser_options_handler2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698