diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-23 21:57:10 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-23 21:57:10 +0000 |
commit | e26092ee0313c209ecfc13adf4015d55a4eb38db (patch) | |
tree | 7d339472915c816af4b06096ba35eb6d5f1bbd2b /sandbox/src/sandbox_utils.h | |
parent | 3b296845029d75743c4c434486cc55e5df196687 (diff) | |
download | chromium_src-e26092ee0313c209ecfc13adf4015d55a4eb38db.zip chromium_src-e26092ee0313c209ecfc13adf4015d55a4eb38db.tar.gz chromium_src-e26092ee0313c209ecfc13adf4015d55a4eb38db.tar.bz2 |
Move a function from controller.cc to sandbox_utils.cc in
preparation for the refactoring.
Review URL: http://codereview.chromium.org/16225
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7445 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox/src/sandbox_utils.h')
-rw-r--r-- | sandbox/src/sandbox_utils.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sandbox/src/sandbox_utils.h b/sandbox/src/sandbox_utils.h index ad158bf..ffb5c3d 100644 --- a/sandbox/src/sandbox_utils.h +++ b/sandbox/src/sandbox_utils.h @@ -33,6 +33,20 @@ bool IsXPSP2OrLater(); void InitObjectAttribs(const std::wstring& name, ULONG attributes, HANDLE root, OBJECT_ATTRIBUTES* obj_attr, UNICODE_STRING* uni_name); +// The next 2 functions are copied from base\string_util.h and have been +// slighty modified because we don't want to depend on ICU. +template <class char_type> +inline char_type* WriteInto( + std::basic_string<char_type, std::char_traits<char_type>, + std::allocator<char_type> >* str, + size_t length_including_null) { + str->reserve(length_including_null); + str->resize(length_including_null - 1); + return &((*str)[0]); +} + +std::string WideToMultiByte(const std::wstring& wide); + }; // namespace sandbox #endif // SANDBOX_SRC_SANDBOX_UTILS_H__ |