Chromium Code Reviews| 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 55ebfe8cc730bdb06ba1a7e24bf6a7ee4473c378..2e0cf50d52bb47729f106464c002fae8febd658d 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) { |
| + switch (actionType) { |
| + case sync_ui_util::REAUTHENTICATE: |
| + return std::string("reauthenticate"); |
|
tommycli
2016/10/28 21:21:09
nit: are you sure it's necessary to wrap all these
Moe
2016/11/01 19:44:01
Done.
|
| + case sync_ui_util::UPGRADE_CLIENT: |
| + return std::string("upgradeClient"); |
| + case sync_ui_util::ENTER_PASSPHRASE: |
| + return std::string("enterPassphrase"); |
| + default: |
| + return std::string("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); |
| 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()); |