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

Unified Diff: chrome/browser/geolocation/geolocation_permission_context.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/geolocation/geolocation_permission_context.cc
diff --git a/chrome/browser/geolocation/geolocation_permission_context.cc b/chrome/browser/geolocation/geolocation_permission_context.cc
index 7110b4fdbfea8829568a0c5db7e0787421c463f3..065f548805f56daaa900c8081ab598158e6fc10e 100644
--- a/chrome/browser/geolocation/geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context.cc
@@ -10,6 +10,7 @@
#include "components/content_settings/core/common/permission_request_id.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/geolocation_provider.h"
+#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
@@ -70,8 +71,8 @@ void GeolocationPermissionContext::UpdateTabContext(
bool allowed) {
// WebContents may have gone away (or not exists for extension).
Bernhard Bauer 2015/05/27 08:26:40 Can you move this comment to the `if (content_sett
mlamouri (slow - plz ping) 2015/05/30 13:31:05 Done.
TabSpecificContentSettings* content_settings =
- TabSpecificContentSettings::Get(id.render_process_id(),
- id.render_view_id());
+ TabSpecificContentSettings::Get(content::RenderFrameHost::FromID(
Bernhard Bauer 2015/05/27 08:26:40 What if RenderFrameHost::FromID returns null?
mlamouri (slow - plz ping) 2015/05/30 13:31:06 content_settings will be null.
+ id.render_process_id(), id.render_frame_id()));
if (content_settings)
content_settings->OnGeolocationPermissionSet(
requesting_frame.GetOrigin(), allowed);

Powered by Google App Engine
This is Rietveld 408576698