Chromium Code Reviews
Help | Chromium Project | Sign in
(60)

Issue 2868042: Backend changes for notifications content settings. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 11 months ago by Nico
Modified:
4 years ago
Reviewers:
John Gregg, bulach
CC:
chromium-reviews, ben+cc_chromium.org, Paweł Hajdan Jr., finnur+watch_chromium.org
Visibility:
Public.

Description

Backend changes for notifications content settings. NotificationExceptionsTableModel is now functional, and DesktopNotificationService::GetContentSetting contains the new permission behavior. Both aren't used anywhere yet, so still no functionality change (but this is the last CL without functionality changes). Also add a ton of tests. BUG=45547 TEST=unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=51669

Patch Set 1 #

Patch Set 2 : cache test #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : done #

Total comments: 20

Patch Set 7 : comments #

Patch Set 8 : '' #

Messages

Total messages: 5 (0 generated)
Nico
4 years, 11 months ago (2010-07-05 19:55:49 UTC) #1
bulach
LGTM nice! a few comments and suggestions below: http://codereview.chromium.org/2868042/diff/15/12001 File chrome/browser/notifications/desktop_notification_service.cc (right): http://codereview.chromium.org/2868042/diff/15/12001#newcode443 chrome/browser/notifications/desktop_notification_service.cc:443: DCHECK_NE(-1, ...
4 years, 11 months ago (2010-07-06 10:05:45 UTC) #2
Nico
http://codereview.chromium.org/2868042/diff/15/12001 File chrome/browser/notifications/desktop_notification_service.cc (right): http://codereview.chromium.org/2868042/diff/15/12001#newcode443 chrome/browser/notifications/desktop_notification_service.cc:443: DCHECK_NE(-1, allowed_sites->Remove(value)) << origin << " was not allowed"; ...
4 years, 11 months ago (2010-07-06 16:33:37 UTC) #3
bulach
clarifying one comment below: http://codereview.chromium.org/2868042/diff/15/12003 File chrome/browser/notifications/desktop_notification_service_unittest.cc (right): http://codereview.chromium.org/2868042/diff/15/12003#newcode54 chrome/browser/notifications/desktop_notification_service_unittest.cc:54: ChromeThread::PostTask(ChromeThread::IO, FROM_HERE, On 2010/07/06 16:33:37, ...
4 years, 11 months ago (2010-07-06 16:47:39 UTC) #4
Nico
4 years, 11 months ago (2010-07-06 16:50:58 UTC) #5
http://codereview.chromium.org/2868042/diff/15/12003
File chrome/browser/notifications/desktop_notification_service_unittest.cc
(right):

http://codereview.chromium.org/2868042/diff/15/12003#newcode54
chrome/browser/notifications/desktop_notification_service_unittest.cc:54:
ChromeThread::PostTask(ChromeThread::IO, FROM_HERE,
On 2010/07/06 16:47:39, bulach wrote:
> On 2010/07/06 16:33:37, Nico wrote:
> > On 2010/07/06 10:05:45, bulach wrote:
> > > seems a bit confusing PauseIOThread and PauseIOThreadIO.
> > > 
> > > perhaps:
> > > void PauseIOThread() {
> > >   if (!ChromeThread::CurrentlyOn(ChromeThread::IO)) {
> > >     ChromeThread::PostTask(ChromeThread::IO, FROM_HERE,
> > >         &ThreadProxy::PauseIOThread);
> > >     return;
> > >   }
> > >   DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
> > >   io_event_.Wait();
> > > }
> > > 
> > > ...if you want to keep the methods separated, then perhaps
> > RequestPauseIOThread
> > > (for the one that calls PostTask) and PauseIOThread (for the one that
calls
> > > Wait) ?
> > 
> > Having just one function is too complicated for me :-)
> > 
> > RequestPauseIOThread() would change the name of the public function, which I
> > don't want to do.
> > 
> > PauseIOThreadOnIOThread() and CacheHasPermissionOnIOThread() are a mouthful,
> so
> > I think I'll keep it as is for now. ThreadProxy is a fairly small class, so
> > hopefully it's ok.
> 
> my concern is that PauseIOThread and its evil twin PauseIOThreadIO are doing
> completely different things on different threads, and yet their names are very
> close.. :) perhaps then just change the private method name?
> something like PauseIOThreadUntilSignaled?
> 
> anyways, not a big deal, it's just a naming suggestion..

PauseIOThread() does the default thread's part of work necessary to pause the io
thread, while PauseIOThreadIO() does the io thread's part of the work :-)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld ec887be