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

Issue 7053041: Add a Create method to DesktopNotificationHandler and stubs for the notification objects. (Closed)

Created:
9 years, 6 months ago by Satish
Modified:
9 years, 6 months ago
Reviewers:
John Gregg, jam, Torne
CC:
chromium-reviews, John Knottenbelt
Visibility:
Public.

Description

Adds a GYP flag for desktop notifications (enabled by default) and stub out relevant code if set to 0. In chrome/browser/task_manager I moved notifications related code to their own files and allow exclusion and stubbing via GYP. Similarly I have added stubs for other parts including a chrome/browser/notifications/notification_stubs.cc which takes care of classes within that directory. I also created some static methods in DesktopNotificationService to wrap commonly used notification related code so that we reduce the amount of stubs required. BUG=none TEST=existing notification tests succeed Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88040

Patch Set 1 : . #

Total comments: 2

Patch Set 2 : Try to fix trybot failures and address torne's comments. #

Total comments: 3

Patch Set 3 : . #

Total comments: 6

Patch Set 4 : . #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+575 lines, -211 lines) Patch
M build/common.gypi View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/desktop_notification_handler.h View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/desktop_notification_handler.cc View 1 1 chunk +9 lines, -3 lines 0 comments Download
A chrome/browser/desktop_notification_handler_stub.cc View 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/browser/notifications/desktop_notification_service.h View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/notifications/desktop_notification_service.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/notifications/desktop_notifications_unittest.cc View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
A chrome/browser/notifications/notification_stubs.cc View 1 2 1 chunk +176 lines, -0 lines 0 comments Download
M chrome/browser/notifications/notification_ui_manager.h View 1 2 3 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/notifications/notification_ui_manager.cc View 1 2 3 1 chunk +7 lines, -1 line 0 comments Download
M chrome/browser/task_manager/task_manager.cc View 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/task_manager/task_manager_browsertest.cc View 1 chunk +0 lines, -33 lines 0 comments Download
A chrome/browser/task_manager/task_manager_notification_browsertest.cc View 1 chunk +106 lines, -0 lines 0 comments Download
A chrome/browser/task_manager/task_manager_notification_resource_provider.cc View 1 chunk +171 lines, -0 lines 0 comments Download
A chrome/browser/task_manager/task_manager_notification_resource_provider_stub.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/browser/task_manager/task_manager_resource_providers.h View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/task_manager/task_manager_resource_providers.cc View 2 chunks +0 lines, -148 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 4 chunks +21 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 6 chunks +17 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.h View 1 2 2 chunks +2 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 2 3 chunks +6 lines, -5 lines 1 comment Download

Messages

Total messages: 12 (0 generated)
Satish
9 years, 6 months ago (2011-05-31 13:53:23 UTC) #1
Satish
Looks like I missed some parts of the change, uploading a new patch shortly.. please ...
9 years, 6 months ago (2011-05-31 15:05:40 UTC) #2
Torne
LGTM generally http://codereview.chromium.org/7053041/diff/3001/build/common.gypi File build/common.gypi (right): http://codereview.chromium.org/7053041/diff/3001/build/common.gypi#newcode437 build/common.gypi:437: 'enable_desktop_notifications%': 0, I assume you have this ...
9 years, 6 months ago (2011-06-02 16:18:35 UTC) #3
John Gregg
http://codereview.chromium.org/7053041/diff/3023/chrome/browser/notifications/desktop_notification_service.h File chrome/browser/notifications/desktop_notification_service.h (right): http://codereview.chromium.org/7053041/diff/3023/chrome/browser/notifications/desktop_notification_service.h#newcode136 chrome/browser/notifications/desktop_notification_service.h:136: Profile* profile); This doesn't make sense to me. Perhaps ...
9 years, 6 months ago (2011-06-03 00:13:54 UTC) #4
Satish
http://codereview.chromium.org/7053041/diff/3023/chrome/browser/notifications/desktop_notification_service.h File chrome/browser/notifications/desktop_notification_service.h (right): http://codereview.chromium.org/7053041/diff/3023/chrome/browser/notifications/desktop_notification_service.h#newcode136 chrome/browser/notifications/desktop_notification_service.h:136: Profile* profile); On 2011/06/03 00:13:54, John Gregg wrote: > ...
9 years, 6 months ago (2011-06-03 07:17:03 UTC) #5
Satish
New patch uploaded addressing all concerns so far, please take a look. http://codereview.chromium.org/7053041/diff/3023/chrome/browser/notifications/desktop_notification_service.h File chrome/browser/notifications/desktop_notification_service.h ...
9 years, 6 months ago (2011-06-03 12:29:54 UTC) #6
John Gregg
http://codereview.chromium.org/7053041/diff/15023/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): http://codereview.chromium.org/7053041/diff/15023/chrome/browser/notifications/desktop_notification_service.cc#newcode596 chrome/browser/notifications/desktop_notification_service.cc:596: return prefs_cache()->HasPermission(origin.GetOrigin()); In what context is this function called? ...
9 years, 6 months ago (2011-06-06 17:12:27 UTC) #7
Satish
Thanks for the review. Replies inline and a new patch uploaded. http://codereview.chromium.org/7053041/diff/15023/chrome/browser/notifications/desktop_notification_service.cc File chrome/browser/notifications/desktop_notification_service.cc (right): ...
9 years, 6 months ago (2011-06-06 20:36:43 UTC) #8
John Gregg
LGTM On 2011/06/06 20:36:43, Satish wrote: > Thanks for the review. Replies inline and a ...
9 years, 6 months ago (2011-06-06 20:44:22 UTC) #9
Satish
Adding John Abd-El-Malek to look and approve the files under content/browser/renderer_host
9 years, 6 months ago (2011-06-06 21:03:45 UTC) #10
jam
lgtm http://codereview.chromium.org/7053041/diff/13023/content/browser/renderer_host/render_message_filter.cc File content/browser/renderer_host/render_message_filter.cc (left): http://codereview.chromium.org/7053041/diff/13023/content/browser/renderer_host/render_message_filter.cc#oldcode21 content/browser/renderer_host/render_message_filter.cc:21: #include "chrome/browser/notifications/notifications_prefs_cache.h" woohoo! please take out this file ...
9 years, 6 months ago (2011-06-06 21:16:22 UTC) #11
jam
9 years, 6 months ago (2011-06-08 17:49:48 UTC) #12
hmm, I had only looked at the content change earlier.  Now that I see this, I
really dislike this approach of adding empty stubs to avoid linker errors.  I
think we should revert this change, and come up with a better way of removing
features at compile time.  This approach is not really maintainable, i.e.
everyone has to remember to edit another file when they add/remove functions, or
else another builder fails.  It also seems like a quick hack to get things
linking, which we should avoid putting in trunk chrome.

Powered by Google App Engine
This is Rietveld 408576698