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

Unified Diff: chrome/browser/ui/webui/settings/people_handler.cc

Issue 2457483002: [MD Settings][Sync Settings] Updates sync status messages (Closed)
Patch Set: Addressed maxbogue's and dbeam's comments Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/settings/people_handler.cc
diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc
index 42911c428336fa92f0b895d1458edc5cebfebf68..927294382c272b68b51569c34594e73bfdf58f4d 100644
--- a/chrome/browser/ui/webui/settings/people_handler.cc
+++ b/chrome/browser/ui/webui/settings/people_handler.cc
@@ -152,6 +152,19 @@ void ParseConfigurationArguments(const base::ListValue* args,
NOTREACHED();
}
+std::string GetSyncErrorAction(sync_ui_util::ActionType action_type) {
+ switch (action_type) {
+ case sync_ui_util::REAUTHENTICATE:
+ return "reauthenticate";
+ case sync_ui_util::UPGRADE_CLIENT:
+ return "upgradeClient";
+ case sync_ui_util::ENTER_PASSPHRASE:
+ return "enterPassphrase";
+ default:
+ return "noAction";
+ }
+}
+
} // namespace
namespace settings {
@@ -731,13 +744,15 @@ PeopleHandler::GetSyncStatusDictionary() {
base::string16 status_label;
base::string16 link_label;
+ sync_ui_util::ActionType action_type = sync_ui_util::NO_ACTION;
bool status_has_error =
sync_ui_util::GetStatusLabels(profile_, service, *signin,
sync_ui_util::PLAIN_TEXT, &status_label,
- &link_label) == sync_ui_util::SYNC_ERROR;
+ &link_label, &action_type) ==
+ sync_ui_util::SYNC_ERROR;
sync_status->SetString("statusText", status_label);
- sync_status->SetString("actionLinkText", link_label);
sync_status->SetBoolean("hasError", status_has_error);
+ sync_status->SetString("statusAction", GetSyncErrorAction(action_type));
sync_status->SetBoolean("managed", service && service->IsManaged());
sync_status->SetBoolean("signedIn", signin->IsAuthenticated());
« no previous file with comments | « chrome/browser/ui/webui/options/sync_setup_handler.cc ('k') | chrome/test/data/webui/settings/people_page_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698