Index: chrome/browser/bookmarks/bookmark_html_writer.cc |
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc |
index d0c9f4358d61d067b48eab89d457f36916b162cd..c0cbd9c317e44725be954b50f6fcf3f480171280 100644 |
--- a/chrome/browser/bookmarks/bookmark_html_writer.cc |
+++ b/chrome/browser/bookmarks/bookmark_html_writer.cc |
@@ -267,11 +267,9 @@ class Writer : public base::RefCountedThreadSafe<Writer> { |
favicons_map_->find(url_string); |
if (itr != favicons_map_->end()) { |
scoped_refptr<base::RefCountedMemory> data(itr->second.get()); |
- std::string favicon_data; |
- favicon_data.assign(reinterpret_cast<const char*>(data->front()), |
- data->size()); |
std::string favicon_base64_encoded; |
- base::Base64Encode(favicon_data, &favicon_base64_encoded); |
+ base::Base64Encode(std::string(data->front_as<char>(), data->size()), |
+ &favicon_base64_encoded); |
GURL favicon_url("data:image/png;base64," + favicon_base64_encoded); |
favicon_string = favicon_url.spec(); |
} |