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

Unified Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 2492293002: [MD Settings][Options] Fixes bugs with the sync status messages/actions (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | chrome/browser/ui/webui/settings/people_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/browser_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index e88c707c3a022a04551cfed59b4fec6669794bc6..4525ab1fe370138b8d52a3f579ebd55604fee437 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -179,6 +179,19 @@ bool IsDisabledByPolicy(const BooleanPrefMember& pref) {
}
#endif // !defined(OS_CHROMEOS)
+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 options {
@@ -1577,7 +1590,7 @@ BrowserOptionsHandler::GetSyncStateDictionary() {
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());
sync_status->SetString("accountInfo",
« no previous file with comments | « chrome/browser/sync/sync_ui_util.cc ('k') | chrome/browser/ui/webui/settings/people_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698