Index: ios/chrome/browser/geolocation/omnibox_geolocation_controller.mm |
diff --git a/ios/chrome/browser/geolocation/omnibox_geolocation_controller.mm b/ios/chrome/browser/geolocation/omnibox_geolocation_controller.mm |
index 12efac918d89aa627d0a08970225bb3da93b2554..4add79f10dcf9c1150c887079e20820d7fef3a12 100644 |
--- a/ios/chrome/browser/geolocation/omnibox_geolocation_controller.mm |
+++ b/ios/chrome/browser/geolocation/omnibox_geolocation_controller.mm |
@@ -442,7 +442,7 @@ - (void)stopUpdatingLocation { |
} |
- (void)addLocationAndReloadTab:(Tab*)tab { |
- if (self.enabled && [tab navigationManager]) { |
+ if (self.enabled && tab.webState) { |
// Make sure that GeolocationUpdater is running the first time we request |
// the current location. |
// |
@@ -453,10 +453,12 @@ - (void)addLocationAndReloadTab:(Tab*)tab { |
// GeolocationUpdater. |
[self startUpdatingLocation]; |
- web::NavigationItem* item = |
- tab.webState->GetNavigationManager()->GetVisibleItem(); |
+ web::NavigationManager* navigationManager = |
+ tab.webState->GetNavigationManager(); |
+ web::NavigationItem* item = navigationManager->GetVisibleItem(); |
if ([self addLocationToNavigationItem:item browserState:tab.browserState]) { |
- [tab reload]; |
+ navigationManager->Reload(web::ReloadType::NORMAL, |
+ false /* check_for_repost */); |
} |
} |
} |