• Elly Fong-Jones's avatar
    cbuiv: clean up BookmarkEditorView a bit · f3bbd5d7
    Elly Fong-Jones authored
    The main change here is to remove most of the logic from Accept().
    There was code in here to handle when Accept() was called with the
    accept button disabled, which is actually impossible*. This change
    also cleans up some other overrides of WidgetDelegate methods in
    BookmarkEditorView.
    
    *: This change also adds a DCHECK to guarantee that AcceptDialog()
       is never called with the accept button disabled. While this
       can't happen in production, a misguided test might reasonably call
       AcceptDialog() without first ensuring that the button is enabled,
       so enforce the invariant redundantly here.
    
    Bug: 1075649
    Change-Id: Ib421da682ef3e8d8dc47be8b22d3339229d8068e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2380255Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
    Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
    Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#807116}
    f3bbd5d7
dialog_delegate.cc 14.3 KB