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

Unified Diff: chrome/browser/favicon/favicon_tab_helper.cc

Issue 261403003: Removes usage of NavigationEntry from favicon_handler.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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: chrome/browser/favicon/favicon_tab_helper.cc
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index a6a7bb84c9411a7ebe413518e51eaf73fca916f9..6b8c2386904f79ab8537836b35f4b4a7ce4ab18b 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -167,6 +167,34 @@ bool FaviconTabHelper::IsOffTheRecord() {
return web_contents()->GetBrowserContext()->IsOffTheRecord();
}
+const GURL FaviconTabHelper::GetActiveURL() {
+ NavigationEntry* entry = web_contents()->GetController().GetActiveEntry();
+ if (!entry || entry->GetURL().is_empty())
+ return GURL();
+ return entry->GetURL();
+}
+
+const GURL FaviconTabHelper::GetActiveFaviconURL() {
+ return GURL();
blundell 2014/05/06 15:04:00 could you implement these so we can see the full C
jif 2014/05/09 14:17:18 Done.
+}
+
+bool FaviconTabHelper::GetActiveFaviconValidity() {
+ return false;
+}
+
+void FaviconTabHelper::SetActiveFaviconValidity(bool validity) {
+ web_contents()->GetController().GetActiveEntry()->GetFavicon().valid =
blundell 2014/05/06 15:04:00 the active entry can be NULL. You probably want a
jif 2014/05/09 14:17:18 Done.
+ validity;
+}
+
+void FaviconTabHelper::SetActiveFaviconImage(gfx::Image image) {
+ web_contents()->GetController().GetActiveEntry()->GetFavicon().image = image;
+}
+
+void FaviconTabHelper::SetActiveFaviconURL(GURL url) {
+ web_contents()->GetController().GetActiveEntry()->GetFavicon().url = url;
+}
+
void FaviconTabHelper::DidStartNavigationToPendingEntry(
const GURL& url,
NavigationController::ReloadType reload_type) {

Powered by Google App Engine
This is Rietveld 408576698