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

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

Issue 6651014: Applied the IconType. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: sync 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/ui/webui/favicon_source.cc
diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui/favicon_source.cc
index 4e0adc35af91f4d303408d9f8674399ae7ce2f06..a4e085f1687952266478a268f307b92edd4a26f4 100644
--- a/chrome/browser/ui/webui/favicon_source.cc
+++ b/chrome/browser/ui/webui/favicon_source.cc
@@ -33,11 +33,13 @@ void FaviconSource::StartDataRequest(const std::string& path,
if (path.size() > 8 && path.substr(0, 8) == "iconurl/") {
handle = favicon_service->GetFavicon(
GURL(path.substr(8)),
+ history::FAVICON,
&cancelable_consumer_,
NewCallback(this, &FaviconSource::OnFaviconDataAvailable));
} else {
handle = favicon_service->GetFaviconForURL(
GURL(path),
+ history::FAVICON,
&cancelable_consumer_,
NewCallback(this, &FaviconSource::OnFaviconDataAvailable));
}
@@ -62,18 +64,15 @@ bool FaviconSource::ShouldReplaceExistingSource() const {
void FaviconSource::OnFaviconDataAvailable(
FaviconService::Handle request_handle,
- bool know_favicon,
- scoped_refptr<RefCountedMemory> data,
- bool expired,
- GURL icon_url) {
+ history::FaviconData favicon) {
FaviconService* favicon_service =
profile_->GetFaviconService(Profile::EXPLICIT_ACCESS);
int request_id = cancelable_consumer_.GetClientData(favicon_service,
request_handle);
- if (know_favicon && data.get() && data->size()) {
+ if (favicon.is_valid()) {
// Forward the data along to the networking system.
- SendResponse(request_id, data);
+ SendResponse(request_id, favicon.image_data);
} else {
SendDefaultResponse(request_id);
}

Powered by Google App Engine
This is Rietveld 408576698