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

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

Issue 1373773003: Implement 'window.isSecureContext'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: document. Created 5 years, 3 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 e23275993c4aafe13db18c74016de70ae3c97801..0b107f98e7dd36f0d7e931346efd508ebff063d9 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
@@ -152,11 +152,11 @@ void Geolocation::recordOriginTypeAccess() const
Document* document = this->document();
ASSERT(document);
- // It is required by isPrivilegedContext() but isn't
+ // It is required by isSecureContext() but isn't
// actually used. This could be used later if a warning is shown in the
// developer console.
String insecureOriginMsg;
- if (document->isPrivilegedContext(insecureOriginMsg)) {
+ if (document->isSecureContext(insecureOriginMsg)) {
UseCounter::count(document, UseCounter::GeolocationSecureOrigin);
} else {
UseCounter::countDeprecation(document, UseCounter::GeolocationInsecureOrigin);
@@ -199,7 +199,7 @@ void Geolocation::startRequest(GeoNotifier *notifier)
{
if (frame()->settings()->strictPowerfulFeatureRestrictions()) {
String errorMessage;
- if (!executionContext()->isPrivilegedContext(errorMessage)) {
+ if (!executionContext()->isSecureContext(errorMessage)) {
notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, errorMessage));
return;
}

Powered by Google App Engine
This is Rietveld 408576698