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

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

Issue 10945010: Switch BookmarkTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/action_box_menu_model.cc
diff --git a/chrome/browser/ui/toolbar/action_box_menu_model.cc b/chrome/browser/ui/toolbar/action_box_menu_model.cc
index 31cafeed3482a6ab43c82f2eb22b097a285d99e7..4aa1fd49d08bbaddadbe5cac0b4c5da9e6a46ff2 100644
--- a/chrome/browser/ui/toolbar/action_box_menu_model.cc
+++ b/chrome/browser/ui/toolbar/action_box_menu_model.cc
@@ -48,8 +48,11 @@ ActionBoxMenuModel::ActionBoxMenuModel(Browser* browser)
rb.GetNativeImageNamed(IDR_MOBILE));
}
- TabContents* current_tab_contents = chrome::GetActiveTabContents(browser_);
- bool starred = current_tab_contents->bookmark_tab_helper()->is_starred();
+ content::WebContents* current_web_contents =
+ chrome::GetActiveWebContents(browser_);
+ BookmarkTabHelper* bookmark_tab_helper =
+ BookmarkTabHelper::FromWebContents(current_web_contents);
+ bool starred = bookmark_tab_helper->is_starred();
AddItemWithStringId(IDC_BOOKMARK_PAGE,
starred ? IDS_TOOLTIP_STARRED : IDS_TOOLTIP_STAR);
SetIcon(GetIndexOfCommandId(IDC_BOOKMARK_PAGE),
« 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