• rob's avatar
    Show only one profile corrupted dialog, support --noerrdialogs · 6d12da2b
    rob authored
    Make sure that at most one profile corruption error dialog is shown at
    any given time. Currently I ocasionally get six dialogs with an
    identical error message when I start Chrome while the profile is locked.
    Although, the ShowProfileErrorDialog method is called with two different
    messages (corrupt profile vs incompatible profile), I have only seen one
    of them showing up at any time, so the boolean guard is applied to any
    dialog generated by ShowProfileErrorDialog.
    
    R=pkasting@chromium.org
    BUG=446732,447791
    TEST=Manually:
    1. Start Chrome to initialize the profile directory.
    2. Close Chrome.
    3. Mark database as read-only: chmod a-r "/tmp/profile/Default/Web Data"
    4. Start Chrome again.
    5. Verify that only one dialog is shown (instead of six).
    6. Close Chrome.
    7. Start Chrome, with the --noerrdialogs flag.
    8. Verify that no error dialogs are displayed at all (instead of six).
    
    Review URL: https://codereview.chromium.org/873253002
    
    Cr-Commit-Position: refs/heads/master@{#314318}
    6d12da2b
profile_error_dialog.cc 1.19 KB