• gchatz's avatar
    Defer effects of HandleViewed/HandleClosed until prefs are loaded again. · ab57275f
    gchatz authored
    This CL changes NotificationPromo's HandleViewed/HandleClosed methods to
    not update the current instance variables and just save the updated
    values to prefs. This is needed because HandleViewed can be called
    in the middle of the chain of CanShow calls made during layout of the
    NTP, causing some CanShow calls to return true while others to return
    false during the same layout. By not saving the updated values to the
    current instance variables, the CanShow calls will remain consistent
    during the same layout. To facilitate this change, this CL also changes
    the return type of HandleViewed to void since the return value is never
    used.
    
    BUG=625192
    
    Review-Url: https://codereview.chromium.org/2140173009
    Cr-Commit-Position: refs/heads/master@{#407218}
    ab57275f
notification_promo.h 3.53 KB