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

Side by Side Diff: chrome/browser/favicon/favicon_handler.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: remove the auxiliary structure for non-URL cases. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/favicon/favicon_handler.h" 5 #include "chrome/browser/favicon/favicon_handler.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 const FaviconService::FaviconResultsCallback& callback) { 386 const FaviconService::FaviconResultsCallback& callback) {
387 GetFaviconService()->GetFavicon(icon_url, icon_type, preferred_icon_size(), 387 GetFaviconService()->GetFavicon(icon_url, icon_type, preferred_icon_size(),
388 ui::GetSupportedScaleFactors(), consumer, callback); 388 ui::GetSupportedScaleFactors(), consumer, callback);
389 } 389 }
390 390
391 void FaviconHandler::GetFaviconForURL( 391 void FaviconHandler::GetFaviconForURL(
392 const GURL& page_url, 392 const GURL& page_url,
393 int icon_types, 393 int icon_types,
394 CancelableRequestConsumerBase* consumer, 394 CancelableRequestConsumerBase* consumer,
395 const FaviconService::FaviconResultsCallback& callback) { 395 const FaviconService::FaviconResultsCallback& callback) {
396 GetFaviconService()->GetFaviconForURL(profile_, page_url, icon_types, 396 GetFaviconService()->GetFaviconForURL(
397 preferred_icon_size(), ui::GetSupportedScaleFactors(), consumer, 397 FaviconService::FaviconForURLParams(profile_, page_url, icon_types,
398 callback); 398 preferred_icon_size(), consumer),
399 ui::GetSupportedScaleFactors(), callback);
399 } 400 }
400 401
401 void FaviconHandler::SetHistoryFavicon( 402 void FaviconHandler::SetHistoryFavicon(
402 const GURL& page_url, 403 const GURL& page_url,
403 const GURL& icon_url, 404 const GURL& icon_url,
404 const std::vector<unsigned char>& image_data, 405 const std::vector<unsigned char>& image_data,
405 history::IconType icon_type) { 406 history::IconType icon_type) {
406 GetFaviconService()->SetFavicon(page_url, icon_url, image_data, icon_type); 407 GetFaviconService()->SetFavicon(page_url, icon_url, image_data, icon_type);
407 } 408 }
408 409
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 int height = bitmap.height(); 569 int height = bitmap.height();
569 if (width > 0 && height > 0) { 570 if (width > 0 && height > 0) {
570 gfx::CalculateFaviconTargetSize(&width, &height); 571 gfx::CalculateFaviconTargetSize(&width, &height);
571 return gfx::Image(skia::ImageOperations::Resize( 572 return gfx::Image(skia::ImageOperations::Resize(
572 bitmap, skia::ImageOperations::RESIZE_LANCZOS3, 573 bitmap, skia::ImageOperations::RESIZE_LANCZOS3,
573 width, height)); 574 width, height));
574 } 575 }
575 576
576 return image; 577 return image;
577 } 578 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698