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

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 11011002: Switch FaviconTabHelper to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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/browser.cc ('k') | chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index 31f552ac6e87cfb57871759dad7958dd94fe0ead..7a8551b1a894405878358b481d3b175d1d8c9f1d 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -598,13 +598,13 @@ void BookmarkCurrentPage(Browser* browser) {
GURL url;
string16 title;
- TabContents* tab = GetActiveTabContents(browser);
- bookmark_utils::GetURLAndTitleToBookmark(tab->web_contents(), &url, &title);
+ WebContents* web_contents = GetActiveWebContents(browser);
+ bookmark_utils::GetURLAndTitleToBookmark(web_contents, &url, &title);
bool was_bookmarked = model->IsBookmarked(url);
- if (!was_bookmarked && browser->profile()->IsOffTheRecord()) {
+ if (!was_bookmarked && web_contents->GetBrowserContext()->IsOffTheRecord()) {
// If we're incognito the favicon may not have been saved. Save it now
// so that bookmarks have an icon for the page.
- tab->favicon_tab_helper()->SaveFavicon();
+ FaviconTabHelper::FromWebContents(web_contents)->SaveFavicon();
}
bookmark_utils::AddIfNotBookmarked(model, url, title);
// Make sure the model actually added a bookmark before showing the star. A
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698