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

Unified Diff: chrome/browser/fav_icon_helper.cc

Issue 6651014: Applied the IconType. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 9 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/fav_icon_helper.cc
diff --git a/chrome/browser/fav_icon_helper.cc b/chrome/browser/fav_icon_helper.cc
index a40ec2a7ffbcdc970dc8ab50721ba0abb2ee66ef..babac3c67bf6ab0b68dbc57acfef3180ddd4ec68 100644
--- a/chrome/browser/fav_icon_helper.cc
+++ b/chrome/browser/fav_icon_helper.cc
@@ -52,7 +52,10 @@ void FavIconHelper::FetchFavIcon(const GURL& url) {
// renderer is going to notify us (well TabContents) when the favicon url is
// available.
if (GetFaviconService()) {
- GetFaviconService()->GetFaviconForURL(url_, &cancelable_consumer_,
+ GetFaviconService()->GetFaviconForURL(
+ url_,
+ history::FAV_ICON,
+ &cancelable_consumer_,
NewCallback(this, &FavIconHelper::OnFavIconDataForInitialURL));
}
}
@@ -83,7 +86,8 @@ void FavIconHelper::SetFavIcon(
if (GetFaviconService() && ShouldSaveFavicon(url)) {
std::vector<unsigned char> image_data;
gfx::PNGCodec::EncodeBGRASkBitmap(sized_image, false, &image_data);
- GetFaviconService()->SetFavicon(url, image_url, image_data);
+ GetFaviconService()->SetFavicon(
+ url, image_url, image_data, history::FAV_ICON);
}
if (url == url_) {
@@ -185,7 +189,8 @@ void FavIconHelper::OnFavIconDataForInitialURL(
bool know_favicon,
scoped_refptr<RefCountedMemory> data,
bool expired,
- GURL icon_url) {
+ GURL icon_url,
+ history::IconType) {
NavigationEntry* entry = GetEntry();
if (!entry)
return;
@@ -235,6 +240,7 @@ void FavIconHelper::DownloadFavIconOrAskHistory(NavigationEntry* entry) {
if (profile()->IsOffTheRecord()) {
GetFaviconService()->GetFavicon(
entry->favicon().url(),
+ history::FAV_ICON,
&cancelable_consumer_,
NewCallback(this, &FavIconHelper::OnFavIconData));
} else {
@@ -246,7 +252,9 @@ void FavIconHelper::DownloadFavIconOrAskHistory(NavigationEntry* entry) {
// Issue the request and associate the current page ID with it.
GetFaviconService()->UpdateFaviconMappingAndFetch(
entry->url(),
- entry->favicon().url(), &cancelable_consumer_,
+ entry->favicon().url(),
+ history::FAV_ICON,
+ &cancelable_consumer_,
NewCallback(this, &FavIconHelper::OnFavIconData));
}
}
@@ -257,7 +265,8 @@ void FavIconHelper::OnFavIconData(
bool know_favicon,
scoped_refptr<RefCountedMemory> data,
bool expired,
- GURL icon_url) {
+ GURL icon_url,
+ history::IconType) {
NavigationEntry* entry = GetEntry();
if (!entry)
return;

Powered by Google App Engine
This is Rietveld 408576698