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

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

Issue 5753007: Make us save favicon in incognito mode if the url is bookmarked. This (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Merged and renamed method Created 10 years 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/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/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 67d313acaf84d2cfaf1c46719f39b5caf20f7ff3..084938c4b18d4a9662ca28173c88a0221df5001c 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1505,9 +1505,14 @@ void Browser::BookmarkCurrentPage() {
GURL url;
string16 title;
- bookmark_utils::GetURLAndTitleToBookmark(GetSelectedTabContents(), &url,
- &title);
+ TabContents* tab = GetSelectedTabContents();
+ bookmark_utils::GetURLAndTitleToBookmark(tab, &url, &title);
bool was_bookmarked = model->IsBookmarked(url);
+ if (!was_bookmarked && profile_->IsOffTheRecord()) {
+ // If we're off the record the favicon may not have been saved. Save it now
+ // so that bookmarks have an icon for the page.
+ tab->SaveFavicon();
+ }
model->SetURLStarred(url, title, true);
// Make sure the model actually added a bookmark before showing the star. A
// bookmark isn't created if the url is invalid.
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698