Index: chrome/common/extensions/extension.cc |
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc |
index f5e6bbab4c4c91a48e42a7d5af7abd9df99d7527..4e9d2225d42d360b1e7bc33224d0c5ae2e01fee0 100644 |
--- a/chrome/common/extensions/extension.cc |
+++ b/chrome/common/extensions/extension.cc |
@@ -189,11 +189,6 @@ bool ReadLaunchDimension(const extensions::Manifest* manifest, |
return true; |
} |
-std::string SizeToString(const gfx::Size& max_size) { |
- return base::IntToString(max_size.width()) + "x" + |
- base::IntToString(max_size.height()); |
-} |
- |
bool ContainsManifestForbiddenPermission(const APIPermissionSet& apis, |
string16* error) { |
CHECK(error); |
@@ -871,34 +866,6 @@ GURL Extension::GetFullLaunchURL() const { |
url().Resolve(launch_local_path()); |
} |
-void Extension::SetCachedImage(const ExtensionResource& source, |
- const SkBitmap& image, |
- const gfx::Size& original_size) const { |
- DCHECK(source.extension_root() == path()); // The resource must come from |
- // this extension. |
- const base::FilePath& path = source.relative_path(); |
- gfx::Size actual_size(image.width(), image.height()); |
- std::string location; |
- if (actual_size != original_size) |
- location = SizeToString(actual_size); |
- image_cache_[ImageCacheKey(path, location)] = image; |
-} |
- |
-bool Extension::HasCachedImage(const ExtensionResource& source, |
- const gfx::Size& max_size) const { |
- DCHECK(source.extension_root() == path()); // The resource must come from |
- // this extension. |
- return GetCachedImageImpl(source, max_size) != NULL; |
-} |
- |
-SkBitmap Extension::GetCachedImage(const ExtensionResource& source, |
- const gfx::Size& max_size) const { |
- DCHECK(source.extension_root() == path()); // The resource must come from |
- // this extension. |
- SkBitmap* image = GetCachedImageImpl(source, max_size); |
- return image ? *image : SkBitmap(); |
-} |
- |
bool Extension::CanExecuteScriptOnPage(const GURL& document_url, |
const GURL& top_frame_url, |
int tab_id, |
@@ -2454,30 +2421,6 @@ bool Extension::LoadContentSecurityPolicy(string16* error) { |
return true; |
} |
-SkBitmap* Extension::GetCachedImageImpl(const ExtensionResource& source, |
- const gfx::Size& max_size) const { |
- const base::FilePath& path = source.relative_path(); |
- |
- // Look for exact size match. |
- ImageCache::iterator i = image_cache_.find( |
- ImageCacheKey(path, SizeToString(max_size))); |
- if (i != image_cache_.end()) |
- return &(i->second); |
- |
- // If we have the original size version cached, return that if it's small |
- // enough. |
- i = image_cache_.find(ImageCacheKey(path, std::string())); |
- if (i != image_cache_.end()) { |
- const SkBitmap& image = i->second; |
- if (image.width() <= max_size.width() && |
- image.height() <= max_size.height()) { |
- return &(i->second); |
- } |
- } |
- |
- return NULL; |
-} |
- |
// Helper method that loads a UserScript object from a dictionary in the |
// content_script list of the manifest. |
bool Extension::LoadUserScriptHelper(const DictionaryValue* content_script, |