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

Unified Diff: components/favicon/content/content_favicon_driver.cc

Issue 1211993005: favicon: Replace usage of GetActiveEntry by GetLastCommittedEntry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/favicon/content/content_favicon_driver.cc
diff --git a/components/favicon/content/content_favicon_driver.cc b/components/favicon/content/content_favicon_driver.cc
index c8efaad86bfabb2d53b7d944f38c1bb28212b9c8..5f4abc72008275d9620946c6fc8c9184332a6e33 100644
--- a/components/favicon/content/content_favicon_driver.cc
+++ b/components/favicon/content/content_favicon_driver.cc
@@ -84,13 +84,13 @@ bool ContentFaviconDriver::IsOffTheRecord() {
GURL ContentFaviconDriver::GetActiveURL() {
tfarina 2015/06/30 21:22:55 Nasko, I guess you want me to rename this and GetA
tfarina 2015/06/30 21:22:55 Should I rename it to GetLastCommittedURL()?
nasko 2015/07/01 05:56:30 Ideally, this should be renamed, but there are man
content::NavigationEntry* entry =
- web_contents()->GetController().GetActiveEntry();
+ web_contents()->GetController().GetLastCommittedEntry();
nasko 2015/07/01 05:56:30 Let's watch for failures/bugs from this CL once it
sdefresne 2015/08/13 09:12:26 drive-by: on iOS we are using GetVisibleItem() eve
return entry ? entry->GetURL() : GURL();
}
base::string16 ContentFaviconDriver::GetActiveTitle() {
content::NavigationEntry* entry =
- web_contents()->GetController().GetActiveEntry();
+ web_contents()->GetController().GetLastCommittedEntry();
return entry ? entry->GetTitle() : base::string16();
}
@@ -119,8 +119,8 @@ void ContentFaviconDriver::SetActiveFaviconImage(const gfx::Image& image) {
}
content::FaviconStatus& ContentFaviconDriver::GetFaviconStatus() {
- DCHECK(web_contents()->GetController().GetActiveEntry());
- return web_contents()->GetController().GetActiveEntry()->GetFavicon();
+ DCHECK(web_contents()->GetController().GetLastCommittedEntry());
+ return web_contents()->GetController().GetLastCommittedEntry()->GetFavicon();
}
ContentFaviconDriver::ContentFaviconDriver(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698