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

Issue 2179283002: Refactored signin/sync error controllers for the avatar button (Closed)

Created:
4 years, 5 months ago by Jane
Modified:
4 years, 4 months ago
CC:
chromium-reviews, tfarina, sync-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactored signin/sync error controllers for the avatar button Background: The titlebar avatar button needs to display a warning icon when there is: 1. an auth error; or 2. a sync error, including unrecoverable errors, outdated client error, and sync passphrase error (MD user menu only). Its auth error controller and sync error controller previously resided in its UI code, new_avatar_button. Meanwhile, the MD user menu displays an error message and button for the same set of errors, and the logic for classifying each error previously resided in its UI code, profile_chooser_view. In this CL, the following refactoring was done: 1. sync error controller for avatar button: from new_avatar_button to avatar_sync_error_controller; 2. signin error controller for avatar button: from new_avatar_button to avatar_signin_error_controller; 3. the logic for classifying different errors: from profile_chooser_view to sync_ui_util. They will all be used on both Linux UI (this CL) and Mac UI (followup CL). BUG=615893 Committed: https://crrev.com/e4525c4a250b0d405abaecd6ba9bae7e46bfdda3 Cr-Commit-Position: refs/heads/master@{#409439}

Patch Set 1 : Prototype #

Total comments: 6

Patch Set 2 : Working version #

Patch Set 3 : Refactored logic for classifying errors #

Total comments: 2

Patch Set 4 : Enum name change #

Total comments: 6

Patch Set 5 : Made nested classes private #

Total comments: 2

Patch Set 6 : New refactoring #

Total comments: 6

Patch Set 7 : Pure virtual interface #

Total comments: 9

Patch Set 8 : Comments #

Total comments: 2

Patch Set 9 : Switch statement minor change #

Patch Set 10 : Renaming NO_ERROR to prevent WIN compilation error #

Patch Set 11 : Uninitialized ptr #

Unified diffs Side-by-side diffs Delta from patch set Stats (+342 lines, -182 lines) Patch
M chrome/browser/sync/sync_ui_util.h View 1 2 3 4 5 6 7 8 9 2 chunks +17 lines, -1 line 0 comments Download
M chrome/browser/sync/sync_ui_util.cc View 1 2 3 4 5 6 7 8 9 2 chunks +68 lines, -0 lines 0 comments Download
A chrome/browser/ui/avatar_button_error_controller.h View 1 2 3 4 5 6 7 1 chunk +86 lines, -0 lines 0 comments Download
A chrome/browser/ui/avatar_button_error_controller.cc View 1 2 3 4 5 6 7 1 chunk +108 lines, -0 lines 0 comments Download
A chrome/browser/ui/avatar_button_error_controller_delegate.h View 1 2 3 4 5 6 7 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/profiles/new_avatar_button.h View 1 2 3 4 5 6 4 chunks +9 lines, -43 lines 0 comments Download
M chrome/browser/ui/views/profiles/new_avatar_button.cc View 1 2 3 4 5 6 7 5 chunks +4 lines, -80 lines 0 comments Download
M chrome/browser/ui/views/profiles/profile_chooser_view.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +27 lines, -58 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (27 generated)
Jane
Hi Roger, I put together a working prototype for the refactored sync error observer that ...
4 years, 4 months ago (2016-07-26 13:08:34 UTC) #2
Roger Tawa OOO till Jul 10th
Looks good Jane, a few nits below. https://codereview.chromium.org/2179283002/diff/1/chrome/browser/sync/avatar_sync_error.h File chrome/browser/sync/avatar_sync_error.h (right): https://codereview.chromium.org/2179283002/diff/1/chrome/browser/sync/avatar_sync_error.h#newcode14 chrome/browser/sync/avatar_sync_error.h:14: class AvatarSyncError ...
4 years, 4 months ago (2016-07-26 14:34:25 UTC) #3
Jane
Hi Roger, I addressed your comments and completed the CL. PTAL, thanks! https://codereview.chromium.org/2179283002/diff/1/chrome/browser/sync/avatar_sync_error.h File chrome/browser/sync/avatar_sync_error.h ...
4 years, 4 months ago (2016-07-26 17:31:17 UTC) #6
Jane
Hi Roger, I previously forgot to factor out another chunk of code from profile_chooser_view. Patch ...
4 years, 4 months ago (2016-07-26 18:55:23 UTC) #9
Roger Tawa OOO till Jul 10th
lgtm Nice refactor Jane. https://codereview.chromium.org/2179283002/diff/40001/chrome/browser/sync/sync_ui_util.h File chrome/browser/sync/sync_ui_util.h (right): https://codereview.chromium.org/2179283002/diff/40001/chrome/browser/sync/sync_ui_util.h#newcode40 chrome/browser/sync/sync_ui_util.h:40: }; Maybe make the name ...
4 years, 4 months ago (2016-07-27 15:38:03 UTC) #11
Jane
Thanks Roger! Hi zea@, PTAL at c/b/sync/; and sky@, c/b/ui/views/profiles please. Thanks! https://codereview.chromium.org/2179283002/diff/40001/chrome/browser/sync/sync_ui_util.h File chrome/browser/sync/sync_ui_util.h ...
4 years, 4 months ago (2016-07-27 15:51:02 UTC) #14
sky
https://codereview.chromium.org/2179283002/diff/60001/chrome/browser/signin/avatar_signin_error_controller.h File chrome/browser/signin/avatar_signin_error_controller.h (right): https://codereview.chromium.org/2179283002/diff/60001/chrome/browser/signin/avatar_signin_error_controller.h#newcode16 chrome/browser/signin/avatar_signin_error_controller.h:16: explicit AvatarSigninErrorController(Profile* profile); This class and usage of it ...
4 years, 4 months ago (2016-07-27 18:17:30 UTC) #15
maxbogue
zea@ just left for vacation; I'll review the sync code once sky@'s comments are addressed.
4 years, 4 months ago (2016-07-27 18:33:18 UTC) #18
Jane
Thanks! https://codereview.chromium.org/2179283002/diff/60001/chrome/browser/signin/avatar_signin_error_controller.h File chrome/browser/signin/avatar_signin_error_controller.h (right): https://codereview.chromium.org/2179283002/diff/60001/chrome/browser/signin/avatar_signin_error_controller.h#newcode16 chrome/browser/signin/avatar_signin_error_controller.h:16: explicit AvatarSigninErrorController(Profile* profile); On 2016/07/27 18:17:30, sky wrote: ...
4 years, 4 months ago (2016-07-27 20:17:49 UTC) #19
sky
https://codereview.chromium.org/2179283002/diff/60001/chrome/browser/signin/avatar_signin_error_controller.h File chrome/browser/signin/avatar_signin_error_controller.h (right): https://codereview.chromium.org/2179283002/diff/60001/chrome/browser/signin/avatar_signin_error_controller.h#newcode16 chrome/browser/signin/avatar_signin_error_controller.h:16: explicit AvatarSigninErrorController(Profile* profile); On 2016/07/27 20:17:49, Jane wrote: > ...
4 years, 4 months ago (2016-07-27 21:42:54 UTC) #20
Jane
https://codereview.chromium.org/2179283002/diff/60001/chrome/browser/signin/avatar_signin_error_controller.h File chrome/browser/signin/avatar_signin_error_controller.h (right): https://codereview.chromium.org/2179283002/diff/60001/chrome/browser/signin/avatar_signin_error_controller.h#newcode16 chrome/browser/signin/avatar_signin_error_controller.h:16: explicit AvatarSigninErrorController(Profile* profile); On 2016/07/27 21:42:54, sky wrote: > ...
4 years, 4 months ago (2016-07-29 13:53:47 UTC) #22
sky
https://codereview.chromium.org/2179283002/diff/120001/chrome/browser/ui/avatar_button_error_controller.h File chrome/browser/ui/avatar_button_error_controller.h (right): https://codereview.chromium.org/2179283002/diff/120001/chrome/browser/ui/avatar_button_error_controller.h#newcode20 chrome/browser/ui/avatar_button_error_controller.h:20: void UpdateSigninError(bool has_signin_error); The two Update functions are meant ...
4 years, 4 months ago (2016-08-01 15:55:27 UTC) #23
Jane
Thanks! https://codereview.chromium.org/2179283002/diff/120001/chrome/browser/ui/avatar_button_error_controller.h File chrome/browser/ui/avatar_button_error_controller.h (right): https://codereview.chromium.org/2179283002/diff/120001/chrome/browser/ui/avatar_button_error_controller.h#newcode20 chrome/browser/ui/avatar_button_error_controller.h:20: void UpdateSigninError(bool has_signin_error); On 2016/08/01 15:55:26, sky wrote: ...
4 years, 4 months ago (2016-08-01 19:10:32 UTC) #24
sky
https://codereview.chromium.org/2179283002/diff/140001/chrome/browser/ui/avatar_button_error_controller.cc File chrome/browser/ui/avatar_button_error_controller.cc (right): https://codereview.chromium.org/2179283002/diff/140001/chrome/browser/ui/avatar_button_error_controller.cc#newcode22 chrome/browser/ui/avatar_button_error_controller.cc:22: void AvatarButtonErrorController::GetAvatarErrorUpdate() { Can you elaborate on why you ...
4 years, 4 months ago (2016-08-01 22:59:40 UTC) #25
Jane
Thanks! https://codereview.chromium.org/2179283002/diff/140001/chrome/browser/ui/avatar_button_error_controller.cc File chrome/browser/ui/avatar_button_error_controller.cc (right): https://codereview.chromium.org/2179283002/diff/140001/chrome/browser/ui/avatar_button_error_controller.cc#newcode22 chrome/browser/ui/avatar_button_error_controller.cc:22: void AvatarButtonErrorController::GetAvatarErrorUpdate() { On 2016/08/01 22:59:40, sky wrote: ...
4 years, 4 months ago (2016-08-02 14:23:18 UTC) #26
sky
LGTM https://codereview.chromium.org/2179283002/diff/140001/chrome/browser/ui/avatar_button_error_controller_delegate.h File chrome/browser/ui/avatar_button_error_controller_delegate.h (right): https://codereview.chromium.org/2179283002/diff/140001/chrome/browser/ui/avatar_button_error_controller_delegate.h#newcode15 chrome/browser/ui/avatar_button_error_controller_delegate.h:15: }; On 2016/08/02 14:23:18, Jane wrote: > On ...
4 years, 4 months ago (2016-08-02 19:34:41 UTC) #27
Jane
Thanks sky@! Hi maxbogue@, would you take a look at c/b/sync please (most of the ...
4 years, 4 months ago (2016-08-02 19:51:03 UTC) #28
maxbogue
//chrome/browser/sync lgtm
4 years, 4 months ago (2016-08-02 20:00:52 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2179283002/220001
4 years, 4 months ago (2016-08-03 02:49:05 UTC) #44
commit-bot: I haz the power
Committed patchset #11 (id:220001)
4 years, 4 months ago (2016-08-03 02:52:36 UTC) #46
commit-bot: I haz the power
4 years, 4 months ago (2016-08-03 02:54:01 UTC) #48
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/e4525c4a250b0d405abaecd6ba9bae7e46bfdda3
Cr-Commit-Position: refs/heads/master@{#409439}

Powered by Google App Engine
This is Rietveld 408576698