| Index: chrome/browser/ui/browser_command_controller.cc
|
| diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
|
| index 2d4c48ca45518fc8f523fdad450afc9614fbd88a..3a4be68a10b1abf0d677b2f95bfdd4cbfd5bb1d9 100644
|
| --- a/chrome/browser/ui/browser_command_controller.cc
|
| +++ b/chrome/browser/ui/browser_command_controller.cc
|
| @@ -946,10 +946,9 @@ void BrowserCommandController::UpdateCommandsForIncognitoAvailability() {
|
| }
|
|
|
| void BrowserCommandController::UpdateCommandsForTabState() {
|
| - TabContents* current_tab_contents = chrome::GetActiveTabContents(browser_);
|
| - if (!current_tab_contents) // May be NULL during tab restore.
|
| + WebContents* current_web_contents = chrome::GetActiveWebContents(browser_);
|
| + if (!current_web_contents) // May be NULL during tab restore.
|
| return;
|
| - WebContents* current_web_contents = current_tab_contents->web_contents();
|
|
|
| // Navigation commands
|
| command_updater_.UpdateCommandEnabled(IDC_BACK, CanGoBack(browser_));
|
| @@ -966,7 +965,7 @@ void BrowserCommandController::UpdateCommandsForTabState() {
|
|
|
| // Page-related commands
|
| window()->SetStarredState(
|
| - current_tab_contents->bookmark_tab_helper()->is_starred());
|
| + BookmarkTabHelper::FromWebContents(current_web_contents)->is_starred());
|
| window()->ZoomChangedForActiveTab(false);
|
| command_updater_.UpdateCommandEnabled(IDC_VIEW_SOURCE,
|
| CanViewSource(browser_));
|
|
|