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

Unified Diff: chrome/browser/possible_url_model.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/possible_url_model.cc
diff --git a/chrome/browser/possible_url_model.cc b/chrome/browser/possible_url_model.cc
index bb49663aa159f8b93afd069d3690e442cef65dbe..c7a75a8cd155333d9622f9c4238aef264d16e23d 100644
--- a/chrome/browser/possible_url_model.cc
+++ b/chrome/browser/possible_url_model.cc
@@ -163,7 +163,7 @@ SkBitmap PossibleURLModel::GetIcon(int row) {
if (favicon_service) {
CancelableRequestProvider::Handle h =
favicon_service->GetFaviconForURL(
- result.url, &consumer_,
+ result.url, history::FAVICON, &consumer_,
NewCallback(this, &PossibleURLModel::OnFaviconAvailable));
consumer_.SetClientData(favicon_service, h, result.index);
// Add an entry to the map so that we don't attempt to request the
@@ -184,17 +184,15 @@ int PossibleURLModel::CompareValues(int row1, int row2, int column_id) {
void PossibleURLModel::OnFaviconAvailable(
FaviconService::Handle h,
- bool favicon_available,
- scoped_refptr<RefCountedMemory> data,
- bool expired,
- GURL icon_url) {
+ history::FaviconData favicon) {
if (profile_) {
FaviconService* favicon_service =
profile_->GetFaviconService(Profile::EXPLICIT_ACCESS);
size_t index = consumer_.GetClientData(favicon_service, h);
- if (favicon_available) {
+ if (favicon.is_valid()) {
// The decoder will leave our bitmap empty on error.
- gfx::PNGCodec::Decode(data->front(), data->size(),
+ gfx::PNGCodec::Decode(favicon.image_data->front(),
+ favicon.image_data->size(),
&(favicon_map_[index]));
// Notify the observer.

Powered by Google App Engine
This is Rietveld 408576698