diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-23 23:25:17 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-23 23:25:17 +0000 |
commit | c17d8d4f525271e66d298e05c494065460a1e468 (patch) | |
tree | 86caa618aba3c3f9561d557fe1c6f27eeffb34e7 | |
parent | fd2bf4fc5ac9b57394317435b57f33c0fa044ebe (diff) | |
download | chromium_src-c17d8d4f525271e66d298e05c494065460a1e468.zip chromium_src-c17d8d4f525271e66d298e05c494065460a1e468.tar.gz chromium_src-c17d8d4f525271e66d298e05c494065460a1e468.tar.bz2 |
Remove ResourceBundle::LoadImageResourceBytes since it appears to
be identical to LoadDataResourceBytes. Migrate callers to
LoadDataResourceBytes.
Review URL: http://codereview.chromium.org/437019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32885 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | app/resource_bundle.cc | 5 | ||||
-rw-r--r-- | app/resource_bundle.h | 5 | ||||
-rw-r--r-- | app/resource_bundle_linux.cc | 2 | ||||
-rw-r--r-- | chrome/browser/browser_theme_provider.cc | 2 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_favicon_source.cc | 2 | ||||
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_thumbnail_source.cc | 4 | ||||
-rw-r--r-- | chrome/browser/dom_ui/downloads_ui.cc | 2 | ||||
-rw-r--r-- | chrome/browser/dom_ui/history_ui.cc | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/extensions_ui.cc | 2 | ||||
-rw-r--r-- | chrome/browser/sync/sync_setup_wizard.cc | 2 |
10 files changed, 9 insertions, 19 deletions
diff --git a/app/resource_bundle.cc b/app/resource_bundle.cc index 4cbd35e..2b60c78 100644 --- a/app/resource_bundle.cc +++ b/app/resource_bundle.cc @@ -86,11 +86,6 @@ std::string ResourceBundle::GetDataResource(int resource_id) { return GetRawDataResource(resource_id).as_string(); } -RefCountedStaticMemory* ResourceBundle::LoadImageResourceBytes( - int resource_id) { - return LoadResourceBytes(resources_data_, resource_id); -} - RefCountedStaticMemory* ResourceBundle::LoadDataResourceBytes( int resource_id) { return LoadResourceBytes(resources_data_, resource_id); diff --git a/app/resource_bundle.h b/app/resource_bundle.h index e4819c3..e608ccd 100644 --- a/app/resource_bundle.h +++ b/app/resource_bundle.h @@ -84,11 +84,6 @@ class ResourceBundle { // is missing. SkBitmap* GetBitmapNamed(int resource_id); - // Loads the raw bytes of an image resource into |bytes|, - // without doing any processing or interpretation of - // the resource. Returns whether we successfully read the resource. - RefCountedStaticMemory* LoadImageResourceBytes(int resource_id); - // Loads the raw bytes of a data resource into |bytes|, // without doing any processing or interpretation of // the resource. Returns whether we successfully read the resource. diff --git a/app/resource_bundle_linux.cc b/app/resource_bundle_linux.cc index 99ac0d7..ca23792 100644 --- a/app/resource_bundle_linux.cc +++ b/app/resource_bundle_linux.cc @@ -162,7 +162,7 @@ GdkPixbuf* ResourceBundle::GetPixbufImpl(int resource_id, bool rtl_enabled) { } scoped_refptr<RefCountedStaticMemory> data( - LoadImageResourceBytes(resource_id)); + LoadDataResourceBytes(resource_id)); GdkPixbuf* pixbuf = LoadPixbuf(data.get(), rtl_enabled); // We loaded successfully. Cache the pixbuf. diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc index 759dc59..7f598a7 100644 --- a/chrome/browser/browser_theme_provider.cc +++ b/chrome/browser/browser_theme_provider.cc @@ -459,7 +459,7 @@ RefCountedMemory* BrowserThemeProvider::GetRawData(int id) const { RefCountedMemory* data = ReadThemeFileData(id); if (!data) - data = rb_.LoadImageResourceBytes(id); + data = rb_.LoadDataResourceBytes(id); if (!data) return NULL; diff --git a/chrome/browser/dom_ui/dom_ui_favicon_source.cc b/chrome/browser/dom_ui/dom_ui_favicon_source.cc index dfb4d40..34af8fb 100644 --- a/chrome/browser/dom_ui/dom_ui_favicon_source.cc +++ b/chrome/browser/dom_ui/dom_ui_favicon_source.cc @@ -55,7 +55,7 @@ void DOMUIFavIconSource::OnFavIconDataAvailable( } else { if (!default_favicon_.get()) { default_favicon_ = - ResourceBundle::GetSharedInstance().LoadImageResourceBytes( + ResourceBundle::GetSharedInstance().LoadDataResourceBytes( IDR_DEFAULT_FAVICON); } diff --git a/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc b/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc index f707e7e..2194ff2 100644 --- a/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc +++ b/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc @@ -65,7 +65,7 @@ void DOMUIThumbnailSource::DoDataRequest(const std::string& path, // Don't have the thumbnail so return the default thumbnail. if (!default_thumbnail_.get()) { default_thumbnail_ = - ResourceBundle::GetSharedInstance().LoadImageResourceBytes( + ResourceBundle::GetSharedInstance().LoadDataResourceBytes( IDR_DEFAULT_THUMBNAIL); } SendResponse(request_id, default_thumbnail_); @@ -84,7 +84,7 @@ void DOMUIThumbnailSource::OnThumbnailDataAvailable( } else { if (!default_thumbnail_.get()) { default_thumbnail_ = - ResourceBundle::GetSharedInstance().LoadImageResourceBytes( + ResourceBundle::GetSharedInstance().LoadDataResourceBytes( IDR_DEFAULT_THUMBNAIL); } diff --git a/chrome/browser/dom_ui/downloads_ui.cc b/chrome/browser/dom_ui/downloads_ui.cc index f12e812..e74ed23 100644 --- a/chrome/browser/dom_ui/downloads_ui.cc +++ b/chrome/browser/dom_ui/downloads_ui.cc @@ -139,5 +139,5 @@ DownloadsUI::DownloadsUI(TabContents* contents) : DOMUI(contents) { // static RefCountedMemory* DownloadsUI::GetFaviconResourceBytes() { return ResourceBundle::GetSharedInstance(). - LoadImageResourceBytes(IDR_DOWNLOADS_FAVICON); + LoadDataResourceBytes(IDR_DOWNLOADS_FAVICON); } diff --git a/chrome/browser/dom_ui/history_ui.cc b/chrome/browser/dom_ui/history_ui.cc index a97992b..0d78ddd 100644 --- a/chrome/browser/dom_ui/history_ui.cc +++ b/chrome/browser/dom_ui/history_ui.cc @@ -383,5 +383,5 @@ const GURL HistoryUI::GetHistoryURLWithSearchText(const std::wstring& text) { // static RefCountedMemory* HistoryUI::GetFaviconResourceBytes() { return ResourceBundle::GetSharedInstance(). - LoadImageResourceBytes(IDR_HISTORY_FAVICON); + LoadDataResourceBytes(IDR_HISTORY_FAVICON); } diff --git a/chrome/browser/extensions/extensions_ui.cc b/chrome/browser/extensions/extensions_ui.cc index 7eb58bb..bce29b5 100644 --- a/chrome/browser/extensions/extensions_ui.cc +++ b/chrome/browser/extensions/extensions_ui.cc @@ -745,7 +745,7 @@ ExtensionsUI::ExtensionsUI(TabContents* contents) : DOMUI(contents) { // static RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { return ResourceBundle::GetSharedInstance(). - LoadImageResourceBytes(IDR_PLUGIN); + LoadDataResourceBytes(IDR_PLUGIN); } // static diff --git a/chrome/browser/sync/sync_setup_wizard.cc b/chrome/browser/sync/sync_setup_wizard.cc index e003b49..1faf61f 100644 --- a/chrome/browser/sync/sync_setup_wizard.cc +++ b/chrome/browser/sync/sync_setup_wizard.cc @@ -64,7 +64,7 @@ void SyncResourcesSource::StartDataRequest(const std::string& path_raw, scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); if (path_raw == chrome::kSyncThrobberPath) { scoped_refptr<RefCountedMemory> throbber( - ResourceBundle::GetSharedInstance().LoadImageResourceBytes( + ResourceBundle::GetSharedInstance().LoadDataResourceBytes( IDR_THROBBER)); SendResponse(request_id, throbber); return; |