Chromium Code Reviews| Index: content/browser/android/content_view_core_impl.cc |
| diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc |
| index 7aa79eefc542720c2b9e04e982dd5930607d2fee..e8f96ef0a02de21e0719e530d9e883730e1fb995 100644 |
| --- a/content/browser/android/content_view_core_impl.cc |
| +++ b/content/browser/android/content_view_core_impl.cc |
| @@ -364,10 +364,15 @@ jint ContentViewCoreImpl::GetBackgroundColor(JNIEnv* env, jobject obj) { |
| } |
| void ContentViewCoreImpl::PauseOrResumeGeolocation(bool should_pause) { |
| - if (should_pause) |
| - web_contents_->GetGeolocationServiceContext()->PauseUpdates(); |
| - else |
| - web_contents_->GetGeolocationServiceContext()->ResumeUpdates(); |
| + if (should_pause) { |
| + GeolocationServiceContext::GetOrCreateForWebContents(web_contents_) |
| + ->PauseUpdates(); |
| + } else { |
| + auto geolocation_service_context = |
|
Anand Mistry (off Chromium)
2015/11/10 04:53:39
Why the difference?
Sam McNally
2015/11/11 07:04:02
Pausing should create the context so that if the f
|
| + GeolocationServiceContext::FromWebContents(web_contents_); |
| + if (geolocation_service_context) |
| + geolocation_service_context->ResumeUpdates(); |
| + } |
| } |
| // All positions and sizes are in CSS pixels. |