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

Unified Diff: chrome/browser/geolocation/geolocation_permission_context.cc

Issue 1726323002: Have Permission{Manager,Service} use Origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Blimp interface. Created 4 years, 10 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 10ca37e0f1d046bda4c38e61048a9273e7d7d7f1..2647dc1e4b2ea8ff1be7af433742e883e24466d1 100644
--- a/chrome/browser/geolocation/geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context.cc
@@ -26,8 +26,8 @@ GeolocationPermissionContext::~GeolocationPermissionContext() {
void GeolocationPermissionContext::DecidePermission(
content::WebContents* web_contents,
const PermissionRequestID& id,
- const GURL& requesting_origin,
- const GURL& embedding_origin,
+ const url::Origin& requesting_origin,
+ const url::Origin& embedding_origin,
const BrowserPermissionCallback& callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -39,12 +39,9 @@ void GeolocationPermissionContext::DecidePermission(
if (permission_set) {
ContentSetting content_setting =
new_permission ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK;
- NotifyPermissionSet(id,
- requesting_origin,
- web_contents->GetLastCommittedURL().GetOrigin(),
- callback,
- false /* persist */,
- content_setting);
+ NotifyPermissionSet(id, requesting_origin,
+ url::Origin(web_contents->GetLastCommittedURL()),
+ callback, false /* persist */, content_setting);
}
return;
}
@@ -68,7 +65,7 @@ void GeolocationPermissionContext::CancelPermissionRequest(
void GeolocationPermissionContext::UpdateTabContext(
const PermissionRequestID& id,
- const GURL& requesting_frame,
+ const url::Origin& requesting_frame,
bool allowed) {
TabSpecificContentSettings* content_settings =
TabSpecificContentSettings::GetForFrame(id.render_process_id(),
@@ -78,7 +75,7 @@ void GeolocationPermissionContext::UpdateTabContext(
// TabSpecificContentSettings will be null.
if (content_settings)
content_settings->OnGeolocationPermissionSet(
- requesting_frame.GetOrigin(), allowed);
+ GURL(requesting_frame.Serialize()), allowed);
Mike West 2016/03/03 09:20:02 Nit: Would you mind adding something like "// TODO
palmer 2016/03/03 21:32:56 Done.
if (allowed) {
content::GeolocationProvider::GetInstance()

Powered by Google App Engine
This is Rietveld 408576698