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

Unified Diff: third_party/WebKit/Source/modules/geolocation/Geolocation.cpp

Issue 1642903005: Update geolocation over HTTP error to use PERMISSION_DENIED (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Address nits Created 4 years, 11 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: third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
index 29fc6138ddd8d7ddd06d6faaf45698dcc0d56af2..10cec9bc45fdcbdaf44095a8a6000d83448a9542 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
@@ -197,7 +197,7 @@ void Geolocation::startRequest(GeoNotifier *notifier)
recordOriginTypeAccess();
String errorMessage;
if (!frame()->settings()->allowGeolocationOnInsecureOrigins() && !executionContext()->isSecureContext(errorMessage)) {
- notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, errorMessage));
+ notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, errorMessage));
return;
}
@@ -206,7 +206,7 @@ void Geolocation::startRequest(GeoNotifier *notifier)
Element* owner = document()->ownerElement();
if (owner && owner->hasAttribute(HTMLNames::permissionsAttr)) {
String errorMessage = "A cross-origin iframe needs its permissions attribute properly set in order to use the geolocation API.";
- notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, errorMessage));
+ notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, errorMessage));
return;
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/powerfulFeatureRestrictions/old-powerful-features-on-insecure-origin.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698