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

Issue 1086393005: Push API: Clarify needed_but_not_shown logic (Closed)

Created:
5 years, 8 months ago by johnme
Modified:
5 years, 8 months ago
CC:
chromium-reviews, mvanouwerkerk+watch_chromium.org, peter+watch_chromium.org, johnme+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@deflake
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Push API: Clarify needed_but_not_shown logic The final if condition in PushMessagingServiceImpl::DidGetNotificationsShown is always true. This patch replaces the if with DCHECKs to make the code more understandable. Committed: https://crrev.com/c8d41cd2e5c44a43e1606555bfe8b7bfdf376cb9 Cr-Commit-Position: refs/heads/master@{#326811}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -36 lines) Patch
M chrome/browser/push_messaging/push_messaging_service_impl.cc View 2 chunks +36 lines, -36 lines 1 comment Download

Messages

Total messages: 9 (3 generated)
johnme
5 years, 8 months ago (2015-04-23 16:13:53 UTC) #2
Michael van Ouwerkerk
lgtm
5 years, 8 months ago (2015-04-24 12:35:17 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1086393005/1
5 years, 8 months ago (2015-04-24 15:22:01 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 8 months ago (2015-04-24 16:14:13 UTC) #6
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/c8d41cd2e5c44a43e1606555bfe8b7bfdf376cb9 Cr-Commit-Position: refs/heads/master@{#326811}
5 years, 8 months ago (2015-04-24 16:14:54 UTC) #7
Peter Beverloo
5 years, 8 months ago (2015-04-26 19:42:22 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/1086393005/diff/1/chrome/browser/push_messagi...
File chrome/browser/push_messaging/push_messaging_service_impl.cc (right):

https://codereview.chromium.org/1086393005/diff/1/chrome/browser/push_messagi...
chrome/browser/push_messaging/push_messaging_service_impl.cc:386:
DCHECK(notification_shown || notification_needed);  // Caller must ensure this
nit: I prefer to have DCHECKs validating the arguments as the very first thing
in a method, as they're essentially "entry conditions".

I don't think "Caller must ensure this" adds much value - there would not be a
DCHECK if this were not the case.

Powered by Google App Engine
This is Rietveld 408576698