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

Unified Diff: sandbox/src/sandbox_utils.cc

Issue 8418034: Make string_util::WriteInto() DCHECK() that the supplied |length_with_null| > 1, meaning that the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « sandbox/src/sandbox_utils.h ('k') | sandbox/tests/common/controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/src/sandbox_utils.cc
===================================================================
--- sandbox/src/sandbox_utils.cc (revision 111826)
+++ sandbox/src/sandbox_utils.cc (working copy)
@@ -76,21 +76,4 @@
InitializeObjectAttributes(obj_attr, uni_name, attributes, root, NULL);
}
-std::string WideToMultiByte(const std::wstring& wide) {
- if (wide.length() == 0)
- return std::string();
-
- // compute the length of the buffer we'll need
- int charcount = WideCharToMultiByte(CP_UTF8, 0, wide.c_str(), -1,
- NULL, 0, NULL, NULL);
- if (charcount == 0)
- return std::string();
-
- std::string mb;
- WideCharToMultiByte(CP_UTF8, 0, wide.c_str(), -1,
- WriteInto(&mb, charcount), charcount, NULL, NULL);
-
- return mb;
-}
-
}; // namespace sandbox
« no previous file with comments | « sandbox/src/sandbox_utils.h ('k') | sandbox/tests/common/controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698