Modernize SyncNotificationController
This CL attempts to make the implementation of this class clearer via some renames, added comments and other minor changes. Some related code in SyncSettingsUtils is also touched: - Rename SyncSettingsUtils.getMessageId() to make it clear the returned value is the same as the sync status summary used in settings, only restricted to the special case of auth errors. The signature is also made more consistent with other methods in the same file. - Use Context.getString() consistently in getSyncStatusSummary(), rather than alternate between this and Resources.getString(). - Add more protective code to getSyncStatusSummaryForAuthError(). The method now guards against the case of no error, or an unknown auth error being passed. This doesn't influence any of the existing callsites. Bug: None Change-Id: I30dd52d2a3af66cc62e2037bc94bd1738f109766 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2632751 Commit-Queue: Victor Vianna <victorvianna@google.com> Reviewed-by:Maksim Moskvitin <mmoskvitin@google.com> Reviewed-by:
Marc Treib <treib@chromium.org> Cr-Commit-Position: refs/heads/master@{#846036}
Showing
This diff is collapsed.
Please register or sign in to comment