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

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

Issue 1309323004: Create a NavigationEntry for the initial blank page. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GetEntryCount, more tests Created 5 years, 2 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
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 5d71df02da46474fa226b884d773367f998f5e66..57b9305a761698bde1640f6b5fde40ab8a6034c3 100644
--- a/components/favicon/content/content_favicon_driver.cc
+++ b/components/favicon/content/content_favicon_driver.cc
@@ -159,13 +159,8 @@ void ContentFaviconDriver::DidUpdateFaviconURL(
const std::vector<content::FaviconURL>& candidates) {
DCHECK(!candidates.empty());
- // Ignore the update if there is no last committed navigation entry. This can
- // occur when loading an initially blank page.
content::NavigationEntry* entry =
web_contents()->GetController().GetLastCommittedEntry();
- if (!entry)
- return;
-
favicon_urls_ = candidates;
OnUpdateFaviconURL(entry->GetURL(),
FaviconURLsFromContentFaviconURLs(candidates));

Powered by Google App Engine
This is Rietveld 408576698