Index: chrome/browser/ui/webui/favicon_source.h |
diff --git a/chrome/browser/ui/webui/favicon_source.h b/chrome/browser/ui/webui/favicon_source.h |
index 2ccc6d3e89bf6d64d5670e8814201a6ec200d689..9df3cd7bde168260eebe5df84f05210dc0b0c6d3 100644 |
--- a/chrome/browser/ui/webui/favicon_source.h |
+++ b/chrome/browser/ui/webui/favicon_source.h |
@@ -48,35 +48,47 @@ class FaviconSource : public ChromeURLDataManager::DataSource { |
virtual bool ShouldReplaceExistingSource() const OVERRIDE; |
protected: |
- virtual ~FaviconSource(); |
- |
- Profile* profile_; |
- |
- private: |
- // Defines the allowed pixel sizes for requested favicons. |
- enum IconSize { |
- SIZE_16, |
- SIZE_32, |
- SIZE_64, |
- NUM_SIZES |
- }; |
- |
struct IconRequest { |
IconRequest() |
: request_id(0), |
+ request_path(""), |
size_in_dip(gfx::kFaviconSize), |
scale_factor(ui::SCALE_FACTOR_NONE) { |
} |
- IconRequest(int id, int size, ui::ScaleFactor scale) |
+ IconRequest(int id, |
+ const std::string& path, |
+ int size, |
+ ui::ScaleFactor scale) |
: request_id(id), |
+ request_path(path), |
size_in_dip(size), |
scale_factor(scale) { |
} |
int request_id; |
+ std::string request_path; |
int size_in_dip; |
ui::ScaleFactor scale_factor; |
}; |
+ virtual ~FaviconSource(); |
+ |
+ // Called when the favicon data is missing to perform additional checks to |
+ // locate the resource. |
+ // |request| contains information for the failed request. |
+ // Returns true if the missing resource is found. |
+ virtual bool HandleMissingResource(const IconRequest& request); |
+ |
+ Profile* profile_; |
+ |
+ private: |
+ // Defines the allowed pixel sizes for requested favicons. |
+ enum IconSize { |
+ SIZE_16, |
+ SIZE_32, |
+ SIZE_64, |
+ NUM_SIZES |
+ }; |
+ |
void Init(Profile* profile, IconType type); |
// Called when favicon data is available from the history backend. |