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

Unified Diff: chrome/browser/bookmarks/bookmark_html_writer.cc

Issue 126103003: Changed RefCountedStaticMemory() to accept a void pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 10 months 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
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();
}
« no previous file with comments | « chrome/browser/android/dev_tools_server.cc ('k') | chrome/browser/devtools/browser_list_tabcontents_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698