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

Unified Diff: sandbox/win/wow_helper/wow_helper.cc

Issue 121123002: Update uses of UTF conversions in ppapi/, printing/, remoting/, rlz/, sandbox/, skia/, sql/, sync/,… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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
« no previous file with comments | « rlz/win/lib/rlz_value_store_registry.cc ('k') | skia/ext/image_operations_bench.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/wow_helper/wow_helper.cc
diff --git a/sandbox/win/wow_helper/wow_helper.cc b/sandbox/win/wow_helper/wow_helper.cc
index 847190ac8b8b43f1ab43b9ff2a4100c7eaa319e6..ea73e8487c2e86768c969c26708885389e849a73 100644
--- a/sandbox/win/wow_helper/wow_helper.cc
+++ b/sandbox/win/wow_helper/wow_helper.cc
@@ -15,43 +15,6 @@
#include "sandbox/win/wow_helper/service64_resolver.h"
#include "sandbox/win/wow_helper/target_code.h"
-namespace {
-
-// Grabbed from base/strings/string_util.h
-template <class string_type>
-inline typename string_type::value_type* WriteInto(string_type* str,
- size_t length_with_null) {
- str->reserve(length_with_null);
- str->resize(length_with_null - 1);
- return &((*str)[0]);
-}
-
-// Grabbed from base/string_util.cc
-std::string WideToMultiByte(const base::string16& wide, UINT code_page) {
- if (wide.length() == 0)
- return std::string();
-
- // compute the length of the buffer we'll need
- int charcount = WideCharToMultiByte(code_page, 0, wide.c_str(), -1,
- NULL, 0, NULL, NULL);
- if (charcount == 0)
- return std::string();
-
- // convert
- std::string mb;
- WideCharToMultiByte(code_page, 0, wide.c_str(), -1,
- WriteInto(&mb, charcount), charcount, NULL, NULL);
-
- return mb;
-}
-
-// Grabbed from base/string_util.cc
-std::string WideToUTF8(const base::string16& wide) {
- return WideToMultiByte(wide, CP_UTF8);
-}
-
-} // namespace
-
namespace sandbox {
// Performs the interception of NtMapViewOfSection on the 64-bit version of
« no previous file with comments | « rlz/win/lib/rlz_value_store_registry.cc ('k') | skia/ext/image_operations_bench.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698