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

Unified Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 10891033: Switch MetroPinTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small clean Created 8 years, 3 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 | « chrome/browser/ui/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698