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

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

Created:
4 years, 5 months ago by gchatz
Modified:
4 years, 5 months ago
CC:
chromium-reviews, sdefresne+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
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 Committed: https://crrev.com/ab57275f5b35d23c5d8504782f229cebdb7de8eb Cr-Commit-Position: refs/heads/master@{#407218}

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: 18 (8 generated)
gchatz
4 years, 5 months ago (2016-07-16 00:34:05 UTC) #5
gchatz
4 years, 5 months ago (2016-07-16 00:34:22 UTC) #7
justincohen
lgtm
4 years, 5 months ago (2016-07-18 00:00:39 UTC) #8
rohitrao (ping after 24h)
What is the lifetime of a NotificationPromo object? Who owns it, and when is it ...
4 years, 5 months ago (2016-07-19 11:40:13 UTC) #9
gchatz
On 2016/07/19 11:40:13, rohitrao wrote: > What is the lifetime of a NotificationPromo object? Who ...
4 years, 5 months ago (2016-07-19 18:38:47 UTC) #10
gchatz
On 2016/07/19 18:38:47, gchatz wrote: > On 2016/07/19 11:40:13, rohitrao wrote: > > What is ...
4 years, 5 months ago (2016-07-21 17:52:50 UTC) #11
rohitrao (ping after 24h)
lgtm
4 years, 5 months ago (2016-07-22 16:40:57 UTC) #12
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/2140173009/1
4 years, 5 months ago (2016-07-22 18:14:13 UTC) #14
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-22 18:51:51 UTC) #16
commit-bot: I haz the power
4 years, 5 months ago (2016-07-22 18:53:12 UTC) #18
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/ab57275f5b35d23c5d8504782f229cebdb7de8eb
Cr-Commit-Position: refs/heads/master@{#407218}

Powered by Google App Engine
This is Rietveld 408576698