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

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

Created:
10 years, 5 months ago by Nico
Modified:
9 years, 7 months 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 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+459 lines, -67 lines) Patch
M chrome/app/resources/locale_settings.grd View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/notifications/desktop_notification_service.h View 1 2 3 4 5 2 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/notifications/desktop_notification_service.cc View 1 2 3 4 5 6 6 chunks +96 lines, -27 lines 0 comments Download
M chrome/browser/notifications/desktop_notification_service_unittest.cc View 6 1 chunk +202 lines, -29 lines 0 comments Download
M chrome/browser/notifications/notification_exceptions_table_model.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/notifications/notification_exceptions_table_model.cc View 1 2 3 4 5 6 4 chunks +54 lines, -5 lines 0 comments Download
M chrome/browser/notifications/notification_exceptions_table_model_unittest.cc View 2 3 4 5 3 chunks +85 lines, -4 lines 0 comments Download
M chrome/browser/notifications/notifications_prefs_cache.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Nico
10 years, 5 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, ...
10 years, 5 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"; ...
10 years, 5 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, ...
10 years, 5 months ago (2010-07-06 16:47:39 UTC) #4
Nico
10 years, 5 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 :-)

Powered by Google App Engine
This is Rietveld 408576698