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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 578883003: Remove the strict dependency on WebContents for Web Notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 b05f8bb43e9cb0a5af59a5f50aca782e2e3a8900..337d17229ef29127cc406ee07594007f5ac74bff 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1904,16 +1904,15 @@ ChromeContentBrowserClient::CheckDesktopNotificationPermission(
void ChromeContentBrowserClient::ShowDesktopNotification(
const content::ShowDesktopNotificationHostMsgParams& params,
- RenderFrameHost* render_frame_host,
+ content::BrowserContext* browser_context,
scoped_ptr<content::DesktopNotificationDelegate> delegate,
base::Closure* cancel_callback) {
#if defined(ENABLE_NOTIFICATIONS)
- content::RenderProcessHost* process = render_frame_host->GetProcess();
- Profile* profile = Profile::FromBrowserContext(process->GetBrowserContext());
+ Profile* profile = Profile::FromBrowserContext(browser_context);
DesktopNotificationService* service =
dewittj 2014/09/17 16:58:48 So DNS needs a Profile* (as opposed to a BrowserCo
Peter Beverloo 2014/09/17 17:06:06 We use the preferences (Profile::GetPrefs()) and h
DesktopNotificationServiceFactory::GetForProfile(profile);
service->ShowDesktopNotification(
- params, render_frame_host, delegate.Pass(), cancel_callback);
+ params, delegate.Pass(), cancel_callback);
Jun Mukai 2014/09/18 18:00:59 doesn't this fit into the previous line?
Peter Beverloo 2014/10/03 14:39:30 Done.
profile->GetHostContentSettingsMap()->UpdateLastUsage(
params.origin, params.origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);

Powered by Google App Engine
This is Rietveld 408576698