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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 433273002: NotificationObjectProxy should own the DesktopNotificationDelegateImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pass as scoped_ptr Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 918dd04f2a40139730d3867c91528d5d467fbeea..88351121395dbec9e7d3929afd7b2e85f99338d0 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -104,6 +104,7 @@
#include "content/public/browser/browser_url_handler.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/child_process_security_policy.h"
+#include "content/public/browser/desktop_notification_delegate.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
@@ -1883,7 +1884,7 @@ ChromeContentBrowserClient::CheckDesktopNotificationPermission(
void ChromeContentBrowserClient::ShowDesktopNotification(
const content::ShowDesktopNotificationHostMsgParams& params,
RenderFrameHost* render_frame_host,
- content::DesktopNotificationDelegate* delegate,
+ scoped_ptr<content::DesktopNotificationDelegate> delegate,
base::Closure* cancel_callback) {
#if defined(ENABLE_NOTIFICATIONS)
content::RenderProcessHost* process = render_frame_host->GetProcess();
@@ -1891,7 +1892,7 @@ void ChromeContentBrowserClient::ShowDesktopNotification(
DesktopNotificationService* service =
DesktopNotificationServiceFactory::GetForProfile(profile);
service->ShowDesktopNotification(
- params, render_frame_host, delegate, cancel_callback);
+ params, render_frame_host, delegate.Pass(), cancel_callback);
profile->GetHostContentSettingsMap()->UpdateLastUsage(
params.origin, params.origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/notifications/desktop_notification_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698