| Index: chrome/browser/ui/toolbar/wrench_menu_model.cc
|
| diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc
|
| index fcd0ad88f7f50b46a842adb6deafbe95073b8028..082e76e9d8b565c3dceca694eb96724be101dc35 100644
|
| --- a/chrome/browser/ui/toolbar/wrench_menu_model.cc
|
| +++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc
|
| @@ -287,10 +287,12 @@ string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const {
|
| }
|
| case IDC_PIN_TO_START_SCREEN: {
|
| int string_id = IDS_PIN_TO_START_SCREEN;
|
| - TabContents* tab_contents = chrome::GetActiveTabContents(browser_);
|
| - if (tab_contents && tab_contents->metro_pin_tab_helper()->is_pinned()) {
|
| + WebContents* web_contents = chrome::GetActiveWebContents(browser_);
|
| + MetroPinTabHelper* tab_helper =
|
| + web_contents ? MetroPinTabHelper::FromWebContents(web_contents)
|
| + : NULL;
|
| + if (tab_helper && tab_helper->is_pinned())
|
| string_id = IDS_UNPIN_FROM_START_SCREEN;
|
| - }
|
| return l10n_util::GetStringUTF16(string_id);
|
| }
|
| default:
|
|
|