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

Unified Diff: ios/chrome/browser/ui/browser_view_controller.mm

Issue 2690943006: Remove CRWSessionEntry usage from BrowserViewController. (Closed)
Patch Set: fix DEPS Created 3 years, 10 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 | « ios/chrome/browser/ui/DEPS ('k') | ios/chrome/browser/ui/preload_controller_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/browser_view_controller.mm
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index 88368c6e54d28706be87be7c63a16d3c19d3c14b..972b2cc44b213fcbb160033b0fa9a08e56f918da 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -170,7 +170,6 @@
#include "ios/public/provider/chrome/browser/voice/voice_search_controller_delegate.h"
#include "ios/public/provider/chrome/browser/voice/voice_search_provider.h"
#import "ios/web/navigation/crw_session_controller.h"
-#import "ios/web/navigation/crw_session_entry.h"
#include "ios/web/navigation/navigation_manager_impl.h"
#include "ios/web/public/active_state_manager.h"
#include "ios/web/public/navigation_item.h"
@@ -1911,11 +1910,10 @@ - (void)updateToolbar {
// Hide the toolbar if displaying phone NTP.
if (!IsIPadIdiom()) {
- CRWSessionEntry* entry =
- [[tab navigationManager]->GetSessionController() currentEntry];
+ web::NavigationItem* item = [tab navigationManager]->GetVisibleItem();
BOOL hideToolbar = NO;
- if (entry) {
- GURL url = [entry navigationItem]->GetURL();
+ if (item) {
+ GURL url = item->GetURL();
BOOL isNTP = url.GetOrigin() == GURL(kChromeUINewTabURL);
hideToolbar = isNTP && !_isOffTheRecord &&
![_toolbarController isOmniboxFirstResponder] &&
@@ -4789,13 +4787,6 @@ - (BOOL)shouldUseDesktopUserAgent {
return [_model currentTab].useDesktopUserAgent;
}
-- (CRWSessionEntry*)currentSessionEntry {
- Tab* tab = [_model currentTab];
- if (![tab navigationManager])
- return nil;
- return [[tab navigationManager]->GetSessionController() currentEntry];
-}
-
#pragma mark - BookmarkBridgeMethods
// If an added or removed bookmark is the same as the current url, update the
« no previous file with comments | « ios/chrome/browser/ui/DEPS ('k') | ios/chrome/browser/ui/preload_controller_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698