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

Unified Diff: chrome/browser/profiles/profile_info_cache.cc

Issue 78903003: Added a new overload of gfx::Image::CreateFrom1xPNGBytes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years 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
« no previous file with comments | « chrome/browser/android/favicon_helper.cc ('k') | chrome/browser/sync/test/integration/bookmarks_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_info_cache.cc
diff --git a/chrome/browser/profiles/profile_info_cache.cc b/chrome/browser/profiles/profile_info_cache.cc
index a886e3f4982cebe5c20a59743ae02c3522e4a8a2..e18450117eac77cdc4d96ecddfefdee6f0d15d8f 100644
--- a/chrome/browser/profiles/profile_info_cache.cc
+++ b/chrome/browser/profiles/profile_info_cache.cc
@@ -155,10 +155,8 @@ void ReadBitmap(const base::FilePath& image_path,
return;
}
- const unsigned char* data =
- reinterpret_cast<const unsigned char*>(image_data.data());
- gfx::Image image =
- gfx::Image::CreateFrom1xPNGBytes(data, image_data.length());
+ gfx::Image image = gfx::Image::CreateFrom1xPNGBytes(
+ base::RefCountedString::TakeString(&image_data));
if (image.IsEmpty()) {
LOG(ERROR) << "Failed to decode PNG file.";
return;
« no previous file with comments | « chrome/browser/android/favicon_helper.cc ('k') | chrome/browser/sync/test/integration/bookmarks_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698