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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 1158813002: Use RenderFrameHost for ::RequestPermission() and ::CancelPermission(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/content_settings/tab_specific_content_settings.cc
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index 89d968c54e6e377c29f3ba17f05f606c84f2328b..c31cb8f91db977d18fd7422accd793a0417bbb75 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -49,7 +49,6 @@
using content::BrowserThread;
using content::NavigationController;
using content::NavigationEntry;
-using content::RenderViewHost;
using content::WebContents;
DEFINE_WEB_CONTENTS_USER_DATA_KEY(TabSpecificContentSettings);
@@ -135,17 +134,13 @@ TabSpecificContentSettings::~TabSpecificContentSettings() {
// static
TabSpecificContentSettings* TabSpecificContentSettings::Get(
- int render_process_id, int render_view_id) {
+ content::RenderFrameHost* render_frame_host) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- RenderViewHost* view = RenderViewHost::FromID(render_process_id,
- render_view_id);
- if (!view)
- return NULL;
-
- WebContents* web_contents = WebContents::FromRenderViewHost(view);
+ WebContents* web_contents =
+ WebContents::FromRenderFrameHost(render_frame_host);
if (!web_contents)
- return NULL;
+ return nullptr;
return TabSpecificContentSettings::FromWebContents(web_contents);
}

Powered by Google App Engine
This is Rietveld 408576698