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; |