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

Issue 2181833003: Defer effects of HandleViewed/HandleClosed until prefs are loaded again. (Closed)

Created:
4 years, 4 months ago by kkhorimoto
Modified:
4 years, 4 months ago
Reviewers:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2785
Target Ref:
refs/pending/branch-heads/2785
Project:
chromium
Visibility:
Public.

Description

Defer effects of HandleViewed/HandleClosed until prefs are loaded again. 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} (cherry picked from commit ab57275f5b35d23c5d8504782f229cebdb7de8eb)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -27 lines) Patch
M ios/chrome/browser/notification_promo.h View 1 chunk +2 lines, -3 lines 0 comments Download
M ios/chrome/browser/notification_promo.cc View 1 chunk +7 lines, -8 lines 0 comments Download
M ios/chrome/browser/notification_promo_unittest.cc View 4 chunks +15 lines, -16 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
kkhorimoto
4 years, 4 months ago (2016-07-26 00:24:43 UTC) #1
Message was sent while issue was closed.
Committed patchset #1 (id:1) to pending queue manually as
72ce83100eb23f5a82e34bb19af65e5ad1aa88a2.

Powered by Google App Engine
This is Rietveld 408576698