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

Side by Side Diff: Source/modules/geolocation/Geolocation.h

Issue 620003005: Record whether Geolocation is accessed from a secure origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@screen_orientation_use_counter
Patch Set: nits Created 6 years, 2 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 2010, The Android Open Source Project 3 * Copyright 2010, The Android Open Source Project
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // the cached position or by requesting one from the controller. Sets a 157 // the cached position or by requesting one from the controller. Sets a
158 // fatal error if permission is denied or no position can be obtained. 158 // fatal error if permission is denied or no position can be obtained.
159 void startRequest(GeoNotifier*); 159 void startRequest(GeoNotifier*);
160 160
161 bool haveSuitableCachedPosition(PositionOptions*); 161 bool haveSuitableCachedPosition(PositionOptions*);
162 162
163 // Runs the success callbacks for the set of notifiers awaiting a cached 163 // Runs the success callbacks for the set of notifiers awaiting a cached
164 // position, the set is then cleared. The oneshots are removed everywhere. 164 // position, the set is then cleared. The oneshots are removed everywhere.
165 void makeCachedPositionCallbacks(); 165 void makeCachedPositionCallbacks();
166 166
167 // Record whether the origin trying to access Geolocation would be allowed
168 // to access a feature that can only be accessed by secure origins.
169 // See http://goo.gl/lq4gCo
170 void recordOriginTypeAccess() const;
171
167 GeoNotifierSet m_oneShots; 172 GeoNotifierSet m_oneShots;
168 GeolocationWatchers m_watchers; 173 GeolocationWatchers m_watchers;
169 GeoNotifierSet m_pendingForPermissionNotifiers; 174 GeoNotifierSet m_pendingForPermissionNotifiers;
170 Member<Geoposition> m_lastPosition; 175 Member<Geoposition> m_lastPosition;
171 176
172 // States of Geolocation permission as granted by the embedder. Unknown 177 // States of Geolocation permission as granted by the embedder. Unknown
173 // means that the embedder still has to be asked for the current permission 178 // means that the embedder still has to be asked for the current permission
174 // level; Requested means that the user has yet to make a decision. 179 // level; Requested means that the user has yet to make a decision.
175 enum Permission { 180 enum Permission {
176 PermissionUnknown, 181 PermissionUnknown,
177 PermissionRequested, 182 PermissionRequested,
178 PermissionAllowed, 183 PermissionAllowed,
179 PermissionDenied 184 PermissionDenied
180 }; 185 };
181 186
182 Permission m_geolocationPermission; 187 Permission m_geolocationPermission;
183 188
184 GeoNotifierSet m_requestsAwaitingCachedPosition; 189 GeoNotifierSet m_requestsAwaitingCachedPosition;
185 }; 190 };
186 191
187 } // namespace blink 192 } // namespace blink
188 193
189 #endif // Geolocation_h 194 #endif // Geolocation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698