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

Unified Diff: ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm

Issue 2785893003: [ios clean] Add placeholder for NTP bookmarks, chrome home and open tabs. (Closed)
Patch Set: Comment nit Created 3 years, 8 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/ui/ntp/new_tab_page_view.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm b/ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm
index 16e91f9b7e5e0008d37b443fb2ec0726b01fc99f..dd8d35b925b1b434c623a15c6be8d73fdedbd678 100644
--- a/ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_toolbar_controller.mm
@@ -206,10 +206,12 @@ enum {
[super hideViewsForNewTabPage:hide];
// Show the back/forward buttons if there is forward history.
ToolbarModelIOS* toolbarModelIOS = [_delegate toolbarModelIOS];
- BOOL forwardEnabled = toolbarModelIOS->CanGoForward();
- [_backButton setHidden:!forwardEnabled && hide];
- [_backButton setEnabled:toolbarModelIOS->CanGoBack()];
- [_forwardButton setHidden:!forwardEnabled && hide];
+ if (toolbarModelIOS) {
+ BOOL forwardEnabled = toolbarModelIOS->CanGoForward();
+ [_backButton setHidden:!forwardEnabled && hide];
+ [_backButton setEnabled:toolbarModelIOS->CanGoBack()];
+ [_forwardButton setHidden:!forwardEnabled && hide];
+ }
}
- (void)focusOmnibox:(id)sender {
« no previous file with comments | « no previous file | ios/chrome/browser/ui/ntp/new_tab_page_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698