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

Side by Side Diff: third_party/WebKit/Source/modules/geolocation/Geolocation.cpp

Issue 2589143003: Add 'get' prefix for Settings.in generated code. (Closed)
Patch Set: Only get prefix and no capitalization. Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Torch Mobile, Inc. 3 * Copyright (C) 2009 Torch Mobile, Inc.
4 * Copyright 2010, The Android Open Source Project 4 * Copyright 2010, The Android Open Source Project
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 DCHECK(document); 130 DCHECK(document);
131 131
132 // It is required by isSecureContext() but isn't 132 // It is required by isSecureContext() but isn't
133 // actually used. This could be used later if a warning is shown in the 133 // actually used. This could be used later if a warning is shown in the
134 // developer console. 134 // developer console.
135 String insecureOriginMsg; 135 String insecureOriginMsg;
136 if (document->isSecureContext(insecureOriginMsg)) { 136 if (document->isSecureContext(insecureOriginMsg)) {
137 UseCounter::count(document, UseCounter::GeolocationSecureOrigin); 137 UseCounter::count(document, UseCounter::GeolocationSecureOrigin);
138 UseCounter::countCrossOriginIframe( 138 UseCounter::countCrossOriginIframe(
139 *document, UseCounter::GeolocationSecureOriginIframe); 139 *document, UseCounter::GeolocationSecureOriginIframe);
140 } else if (frame()->settings()->allowGeolocationOnInsecureOrigins()) { 140 } else if (frame()->settings()->getAllowGeolocationOnInsecureOrigins()) {
141 // TODO(jww): This should be removed after WebView is fixed so that it 141 // TODO(jww): This should be removed after WebView is fixed so that it
142 // disallows geolocation in insecure contexts. 142 // disallows geolocation in insecure contexts.
143 // 143 //
144 // See https://crbug.com/603574. 144 // See https://crbug.com/603574.
145 Deprecation::countDeprecation( 145 Deprecation::countDeprecation(
146 document, UseCounter::GeolocationInsecureOriginDeprecatedNotRemoved); 146 document, UseCounter::GeolocationInsecureOriginDeprecatedNotRemoved);
147 Deprecation::countDeprecationCrossOriginIframe( 147 Deprecation::countDeprecationCrossOriginIframe(
148 *document, 148 *document,
149 UseCounter::GeolocationInsecureOriginIframeDeprecatedNotRemoved); 149 UseCounter::GeolocationInsecureOriginIframeDeprecatedNotRemoved);
150 HostsUsingFeatures::countAnyWorld( 150 HostsUsingFeatures::countAnyWorld(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // have. 187 // have.
188 do { 188 do {
189 watchID = getExecutionContext()->circularSequentialID(); 189 watchID = getExecutionContext()->circularSequentialID();
190 } while (!m_watchers.add(watchID, notifier)); 190 } while (!m_watchers.add(watchID, notifier));
191 return watchID; 191 return watchID;
192 } 192 }
193 193
194 void Geolocation::startRequest(GeoNotifier* notifier) { 194 void Geolocation::startRequest(GeoNotifier* notifier) {
195 recordOriginTypeAccess(); 195 recordOriginTypeAccess();
196 String errorMessage; 196 String errorMessage;
197 if (!frame()->settings()->allowGeolocationOnInsecureOrigins() && 197 if (!frame()->settings()->getAllowGeolocationOnInsecureOrigins() &&
198 !getExecutionContext()->isSecureContext(errorMessage)) { 198 !getExecutionContext()->isSecureContext(errorMessage)) {
199 notifier->setFatalError( 199 notifier->setFatalError(
200 PositionError::create(PositionError::kPermissionDenied, errorMessage)); 200 PositionError::create(PositionError::kPermissionDenied, errorMessage));
201 return; 201 return;
202 } 202 }
203 203
204 // Check whether permissions have already been denied. Note that if this is 204 // Check whether permissions have already been denied. Note that if this is
205 // the case, the permission state can not change again in the lifetime of 205 // the case, the permission state can not change again in the lifetime of
206 // this page. 206 // this page.
207 if (isDenied()) 207 if (isDenied())
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 // be called. In that case, blink has already shut down so do nothing. 546 // be called. In that case, blink has already shut down so do nothing.
547 // 547 //
548 // TODO(sammc): Remove this once renderer shutdown is no longer graceful. 548 // TODO(sammc): Remove this once renderer shutdown is no longer graceful.
549 if (!Platform::current()) 549 if (!Platform::current())
550 return; 550 return;
551 551
552 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED); 552 onGeolocationPermissionUpdated(mojom::blink::PermissionStatus::DENIED);
553 } 553 }
554 554
555 } // namespace blink 555 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698