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

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

Issue 10918065: Introduce structures to reduce the number of arguments in the FaviconService methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use copies rather than refs + fix nits. Created 8 years, 3 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 b2fe5f9913f7f276bb8b8736279fcc0e1e00bd61..52ca43204ffe8c433a832c2d7664f29ef400bbab 100644
--- a/chrome/browser/ui/webui/favicon_source.cc
+++ b/chrome/browser/ui/webui/favicon_source.cc
@@ -55,11 +55,12 @@ void FaviconSource::StartDataRequest(const std::string& path,
if (path.size() > 8 && path.substr(0, 8) == "iconurl/") {
// TODO : Change GetFavicon to support combination of IconType.
handle = favicon_service->GetRawFavicon(
- GURL(path.substr(8)),
- history::FAVICON,
- gfx::kFaviconSize,
+ FaviconService::FaviconParams(
+ GURL(path.substr(8)),
+ history::FAVICON,
+ gfx::kFaviconSize,
+ &cancelable_consumer_),
ui::SCALE_FACTOR_100P,
- &cancelable_consumer_,
base::Bind(&FaviconSource::OnFaviconDataAvailable,
base::Unretained(this)));
} else {
@@ -109,12 +110,13 @@ void FaviconSource::StartDataRequest(const std::string& path,
// TODO(estade): fetch the requested size.
handle = favicon_service->GetRawFaviconForURL(
- profile_,
- url,
- icon_types_,
- gfx::kFaviconSize,
+ FaviconService::FaviconForURLParams(
+ profile_,
+ url,
+ icon_types_,
+ gfx::kFaviconSize,
+ &cancelable_consumer_),
ui::SCALE_FACTOR_100P,
- &cancelable_consumer_,
base::Bind(&FaviconSource::OnFaviconDataAvailable,
base::Unretained(this)));
}

Powered by Google App Engine
This is Rietveld 408576698