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

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

Issue 101113004: Revert 239759 "The comment in base64.h implies that base::Base64..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
Index: trunk/src/chrome/browser/bookmarks/bookmark_html_writer.cc
===================================================================
--- trunk/src/chrome/browser/bookmarks/bookmark_html_writer.cc (revision 239920)
+++ trunk/src/chrome/browser/bookmarks/bookmark_html_writer.cc (working copy)
@@ -270,9 +270,10 @@
favicon_data.assign(reinterpret_cast<const char*>(data->front()),
data->size());
std::string favicon_base64_encoded;
- base::Base64Encode(favicon_data, &favicon_base64_encoded);
- GURL favicon_url("data:image/png;base64," + favicon_base64_encoded);
- favicon_string = favicon_url.spec();
+ if (base::Base64Encode(favicon_data, &favicon_base64_encoded)) {
+ GURL favicon_url("data:image/png;base64," + favicon_base64_encoded);
+ favicon_string = favicon_url.spec();
+ }
}
if (!WriteIndent() ||
« no previous file with comments | « trunk/src/base/base64_unittest.cc ('k') | trunk/src/chrome/browser/chromeos/settings/device_settings_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698