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

Issue 2842043: Add a default content setting to the notifications service. (Closed)

Created:
10 years, 5 months ago by Nico
Modified:
9 years, 7 months ago
Reviewers:
John Gregg, bulach, dhollowa
CC:
chromium-reviews, Paweł Hajdan Jr., ben+cc_chromium.org
Visibility:
Public.

Description

Add a default content setting to the notifications service. Not yet used anywhere, no behavior change. BUG=45547 TEST=none (unit tests) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=51587

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+224 lines, -9 lines) Patch
M chrome/browser/notifications/desktop_notification_service.h View 1 3 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/notifications/desktop_notification_service.cc View 1 8 chunks +46 lines, -0 lines 5 comments Download
A chrome/browser/notifications/desktop_notification_service_unittest.cc View 1 1 chunk +66 lines, -0 lines 2 comments Download
M chrome/browser/notifications/notifications_prefs_cache.h View 5 chunks +14 lines, -1 line 2 comments Download
M chrome/browser/notifications/notifications_prefs_cache.cc View 4 chunks +20 lines, -5 lines 0 comments Download
A chrome/browser/notifications/notifications_prefs_cache_unittest.cc View 1 chunk +63 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 1 chunk +2 lines, -1 line 0 comments Download
M chrome/test/testing_profile.h View 3 chunks +8 lines, -1 line 2 comments Download

Messages

Total messages: 7 (0 generated)
Nico
Writing tests for this is hairier than I thought – I hadn't written multithreaded tests ...
10 years, 5 months ago (2010-07-03 01:40:20 UTC) #1
dhollowa
http://codereview.chromium.org/2842043/diff/2001/3001 File chrome/browser/notifications/desktop_notification_service.cc (right): http://codereview.chromium.org/2842043/diff/2001/3001#newcode40 chrome/browser/notifications/desktop_notification_service.cc:40: const ContentSetting kDefaultSetting = CONTENT_SETTING_ASK; Please wrap in anonymous ...
10 years, 5 months ago (2010-07-03 02:12:01 UTC) #2
Nico
http://codereview.chromium.org/2842043/diff/2001/3001 File chrome/browser/notifications/desktop_notification_service.cc (right): http://codereview.chromium.org/2842043/diff/2001/3001#newcode40 chrome/browser/notifications/desktop_notification_service.cc:40: const ContentSetting kDefaultSetting = CONTENT_SETTING_ASK; On 2010/07/03 02:12:01, dhollowa ...
10 years, 5 months ago (2010-07-03 02:18:29 UTC) #3
dhollowa
LGTM, thanks.
10 years, 5 months ago (2010-07-03 02:22:22 UTC) #4
Nico
http://codereview.chromium.org/2842043/diff/2001/3001 File chrome/browser/notifications/desktop_notification_service.cc (right): http://codereview.chromium.org/2842043/diff/2001/3001#newcode422 chrome/browser/notifications/desktop_notification_service.cc:422: setting == CONTENT_SETTING_DEFAULT ? kDefaultSetting : setting); On 2010/07/03 ...
10 years, 5 months ago (2010-07-03 02:33:18 UTC) #5
bulach
LGTM couple of meta-comments below, probably not worth a new change on their own but ...
10 years, 5 months ago (2010-07-05 09:54:54 UTC) #6
Nico
10 years, 5 months ago (2010-07-05 15:50:13 UTC) #7
Thanks! I'll try to get the spello fixed in my next CL in this area (hopefully
in the next few hours).

http://codereview.chromium.org/2842043/diff/2001/3003
File chrome/browser/notifications/desktop_notification_service_unittest.cc
(right):

http://codereview.chromium.org/2842043/diff/2001/3003#newcode37
chrome/browser/notifications/desktop_notification_service_unittest.cc:37:
ChromeThread::PostTask(ChromeThread::UI, FROM_HERE,
On 2010/07/05 09:54:54, bulach wrote:
> shouldn't this post to IO? also, perhaps DCHECK on the function that it's
> blocking the right thread? or perhaps rename LetIOThreadWait to something like
> BlockUntilSignaled()?

Yes: http://src.chromium.org/viewvc/chrome?view=rev&revision=51588 :-/

http://codereview.chromium.org/2842043/diff/2001/3005
File chrome/browser/notifications/notifications_prefs_cache.h (right):

http://codereview.chromium.org/2842043/diff/2001/3005#newcode26
chrome/browser/notifications/notifications_prefs_cache.h:26: // Once
is_initialized_() is set, all accesses must happen on the IO thread.
On 2010/07/05 09:54:54, bulach wrote:
> s/is_initialized_()/is_initialized()/

Done.

Powered by Google App Engine
This is Rietveld 408576698