Chromium Code Reviews| Index: chrome/browser/geolocation/geolocation_permission_context.cc |
| diff --git a/chrome/browser/geolocation/geolocation_permission_context.cc b/chrome/browser/geolocation/geolocation_permission_context.cc |
| index 31fcdb81505eb3a5493dae809c0ca9e788c9d9b6..6aaa35f1368013440782d19c9a7b82dca56916e4 100644 |
| --- a/chrome/browser/geolocation/geolocation_permission_context.cc |
| +++ b/chrome/browser/geolocation/geolocation_permission_context.cc |
| @@ -10,7 +10,6 @@ |
| #include "chrome/browser/browser_thread.h" |
| #include "chrome/browser/extensions/extensions_service.h" |
| #include "chrome/browser/geolocation/geolocation_content_settings_map.h" |
| -#include "chrome/browser/geolocation/geolocation_dispatcher_host_old.h" |
| #include "chrome/browser/geolocation/geolocation_provider.h" |
| #include "chrome/browser/google/google_util.h" |
| #include "chrome/browser/prefs/pref_service.h" |
| @@ -440,6 +439,12 @@ void GeolocationPermissionContext::StartUpdatingRequested( |
| // Note we cannot store the arbitrator as a member as it is not thread safe. |
| GeolocationProvider* provider = GeolocationProvider::GetInstance(); |
| +#if defined(ENABLE_CLIENT_BASED_GEOLOCATION) |
| + // Client-based Geolocation uses a preemptive permission model, so permission |
| + // ought to have been requested and granted before the controller requests |
| + // requests the client to start updating. |
|
bulach
2010/12/13 14:49:50
s/requests requests/requests/
|
| + DCHECK(provider->HasPermissionBeenGranted()); |
| +#else |
| // WebKit will not request permission until it has received a valid |
| // location, but the google network location provider will not give a |
| // valid location until the user has granted permission. So we cut the Gordian |
| @@ -449,11 +454,14 @@ void GeolocationPermissionContext::StartUpdatingRequested( |
| RequestGeolocationPermission(render_process_id, render_view_id, bridge_id, |
| requesting_frame); |
| } |
| +#endif |
| } |
| void GeolocationPermissionContext::StopUpdatingRequested( |
| int render_process_id, int render_view_id, int bridge_id) { |
| +#if !defined(ENABLE_CLIENT_BASED_GEOLOCATION) |
| CancelPendingInfoBarRequest(render_process_id, render_view_id, bridge_id); |
| +#endif |
| } |
| void GeolocationPermissionContext::NotifyPermissionSet( |