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

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

Issue 2457483002: [MD Settings][Sync Settings] Updates sync status messages (Closed)
Patch Set: Addressed rogerta's comment 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..5501e0115d4ccc3bc7acfa8742b64b1874497033 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 actionType) {
Dan Beam 2016/11/04 17:31:59 GetSyncErrorAction ^
Moe 2016/11/04 21:34:09 Done.
+ switch (actionType) {
+ 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 actionType(sync_ui_util::NO_ACTION);
Dan Beam 2016/11/04 17:31:59 action_type
Moe 2016/11/04 21:34:09 Done.
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, &actionType) ==
+ 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(actionType));
sync_status->SetBoolean("managed", service && service->IsManaged());
sync_status->SetBoolean("signedIn", signin->IsAuthenticated());

Powered by Google App Engine
This is Rietveld 408576698