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

Unified Diff: ios/chrome/browser/geolocation/omnibox_geolocation_controller.mm

Issue 2741413007: Refactoring Reload in NavigationManager and CRWWebController. (Closed)
Patch Set: tentative change Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/chrome/browser/tabs/tab.h » ('j') | ios/chrome/browser/tabs/tab.mm » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 */);
}
}
}
« no previous file with comments | « no previous file | ios/chrome/browser/tabs/tab.h » ('j') | ios/chrome/browser/tabs/tab.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698