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

Unified Diff: ppapi/shared_impl/var.cc

Issue 1200393002: Add more string_util functions to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string
Patch Set: Android Created 5 years, 6 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
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | storage/browser/fileapi/file_system_url.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/var.cc
diff --git a/ppapi/shared_impl/var.cc b/ppapi/shared_impl/var.cc
index c9aee16e30561c4a74c130577c7844926fcb9f71..98c762aa69133a4404068222bcfa1e4b8016a47a 100644
--- a/ppapi/shared_impl/var.cc
+++ b/ppapi/shared_impl/var.cc
@@ -45,9 +45,8 @@ std::string Var::PPVarToLogString(PP_Var var) {
else
result = string->value();
- std::string null;
- null.push_back(0);
- ReplaceSubstringsAfterOffset(&result, 0, null, "\\0");
+ base::ReplaceSubstringsAfterOffset(
+ &result, 0, base::StringPiece("\0", 1), "\\0");
return result;
}
case PP_VARTYPE_OBJECT:
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | storage/browser/fileapi/file_system_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698