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

Unified Diff: chrome/browser/notifications/desktop_notification_service.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/notifications/desktop_notification_service.cc
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index fe01711215aa009542ff8d09b923549620c9062f..1e2bd0ecce41dd5a5ee28258c7ab046b19f2b61d 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -26,6 +26,7 @@
#include "chrome/common/url_constants.h"
#include "components/pref_registry/pref_registry_syncable.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/desktop_notification_delegate.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
@@ -212,12 +213,12 @@ void DesktopNotificationService::RequestNotificationPermission(
void DesktopNotificationService::ShowDesktopNotification(
const content::ShowDesktopNotificationHostMsgParams& params,
content::RenderFrameHost* render_frame_host,
- content::DesktopNotificationDelegate* delegate,
+ scoped_ptr<content::DesktopNotificationDelegate> delegate,
base::Closure* cancel_callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
const GURL& origin = params.origin;
NotificationObjectProxy* proxy =
- new NotificationObjectProxy(render_frame_host, delegate);
+ new NotificationObjectProxy(render_frame_host, delegate.Pass());
base::string16 display_source = DisplayNameForOriginInProcessId(
origin, render_frame_host->GetProcess()->GetID());
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.h ('k') | chrome/browser/notifications/notification_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698