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

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

Issue 1753953002: Add new countDeprecationCrossOriginIframe for deprecated counters (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix lack-of-deprecation-msg Created 4 years, 9 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 // It is required by isSecureContext() but isn't 154 // It is required by isSecureContext() but isn't
155 // actually used. This could be used later if a warning is shown in the 155 // actually used. This could be used later if a warning is shown in the
156 // developer console. 156 // developer console.
157 String insecureOriginMsg; 157 String insecureOriginMsg;
158 if (document->isSecureContext(insecureOriginMsg)) { 158 if (document->isSecureContext(insecureOriginMsg)) {
159 UseCounter::count(document, UseCounter::GeolocationSecureOrigin); 159 UseCounter::count(document, UseCounter::GeolocationSecureOrigin);
160 UseCounter::countCrossOriginIframe(*document, UseCounter::GeolocationSec ureOriginIframe); 160 UseCounter::countCrossOriginIframe(*document, UseCounter::GeolocationSec ureOriginIframe);
161 } else { 161 } else {
162 Deprecation::countDeprecation(document, UseCounter::GeolocationInsecureO rigin); 162 Deprecation::countDeprecation(document, UseCounter::GeolocationInsecureO rigin);
163 UseCounter::countCrossOriginIframe(*document, UseCounter::GeolocationIns ecureOriginIframe); 163 Deprecation::countDeprecationCrossOriginIframe(*document, UseCounter::Ge olocationInsecureOriginIframe);
164 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Fea ture::GeolocationInsecureOrigin); 164 OriginsUsingFeatures::countAnyWorld(*document, OriginsUsingFeatures::Fea ture::GeolocationInsecureOrigin);
165 } 165 }
166 } 166 }
167 167
168 void Geolocation::getCurrentPosition(PositionCallback* successCallback, Position ErrorCallback* errorCallback, const PositionOptions& options) 168 void Geolocation::getCurrentPosition(PositionCallback* successCallback, Position ErrorCallback* errorCallback, const PositionOptions& options)
169 { 169 {
170 if (!frame()) 170 if (!frame())
171 return; 171 return;
172 172
173 GeoNotifier* notifier = GeoNotifier::create(this, successCallback, errorCall back, options); 173 GeoNotifier* notifier = GeoNotifier::create(this, successCallback, errorCall back, options);
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 notifier->startTimer(); 547 notifier->startTimer();
548 else 548 else
549 notifier->setFatalError(PositionError::create(PositionError::POS ITION_UNAVAILABLE, failedToStartServiceErrorMessage)); 549 notifier->setFatalError(PositionError::create(PositionError::POS ITION_UNAVAILABLE, failedToStartServiceErrorMessage));
550 } else { 550 } else {
551 notifier->setFatalError(PositionError::create(PositionError::PERMISS ION_DENIED, permissionDeniedErrorMessage)); 551 notifier->setFatalError(PositionError::create(PositionError::PERMISS ION_DENIED, permissionDeniedErrorMessage));
552 } 552 }
553 } 553 }
554 } 554 }
555 555
556 } // namespace blink 556 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698