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

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

Issue 2945243002: Permissions: Allow PermissionManager to return more PermissionStatusSources.
Patch Set: Cleanup. Created 3 years, 6 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_android.cc
diff --git a/chrome/browser/geolocation/geolocation_permission_context_android.cc b/chrome/browser/geolocation/geolocation_permission_context_android.cc
index e72292789dc87d7ff73a6b61f738ad3653096911..13b0ea4f2c876696a28e2b12a511aa5018d00c96 100644
--- a/chrome/browser/geolocation/geolocation_permission_context_android.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context_android.cc
@@ -90,15 +90,17 @@ GeolocationPermissionContextAndroid::GeolocationPermissionContextAndroid(
GeolocationPermissionContextAndroid::~GeolocationPermissionContextAndroid() {
}
-ContentSetting GeolocationPermissionContextAndroid::GetPermissionStatusInternal(
+PermissionResult
+GeolocationPermissionContextAndroid::GetPermissionStatusInternal(
content::RenderFrameHost* render_frame_host,
const GURL& requesting_origin,
const GURL& embedding_origin) const {
- ContentSetting value =
+ PermissionResult result =
GeolocationPermissionContext::GetPermissionStatusInternal(
render_frame_host, requesting_origin, embedding_origin);
- if (value == CONTENT_SETTING_ASK && requesting_origin == embedding_origin) {
+ if (result.content_setting == CONTENT_SETTING_ASK &&
+ requesting_origin == embedding_origin) {
// Consult the DSE Geolocation setting. Note that this only needs to be
// consulted when the content setting is ASK. In the other cases (ALLOW or
// BLOCK) checking the setting is redundant, as the setting is kept
@@ -119,15 +121,15 @@ ContentSetting GeolocationPermissionContextAndroid::GetPermissionStatusInternal(
url::Origin(embedding_origin))) {
if (!search_helper->GetDSEGeolocationSetting()) {
// If the DSE setting is off, always return BLOCK.
- value = CONTENT_SETTING_BLOCK;
+ result.content_setting = CONTENT_SETTING_BLOCK;
} else if (!profile()->IsOffTheRecord()) {
// Otherwise, return ALLOW only if this is not incognito.
- value = CONTENT_SETTING_ALLOW;
+ result.content_setting = CONTENT_SETTING_ALLOW;
}
}
}
- return value;
+ return result;
}
// static
« no previous file with comments | « chrome/browser/geolocation/geolocation_permission_context_android.h ('k') | chrome/browser/media/midi_permission_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698