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

Side by Side Diff: webkit/base/file_path_string_conversions.cc

Issue 16189015: [OBSOLETE] Slogging webkit_base out of existence. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/base/file_path_string_conversions.h ('k') | webkit/base/origin_url_conversions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/base/file_path_string_conversions.h"
6
7 #include "base/strings/sys_string_conversions.h"
8 #include "base/strings/utf_string_conversions.h"
9 #include "third_party/WebKit/public/platform/WebString.h"
10
11 namespace webkit_base {
12
13 base::FilePath::StringType WebStringToFilePathString(
14 const WebKit::WebString& str) {
15 #if defined(OS_POSIX)
16 return base::SysWideToNativeMB(UTF16ToWideHack(str));
17 #elif defined(OS_WIN)
18 return UTF16ToWideHack(str);
19 #endif
20 }
21
22 WebKit::WebString FilePathStringToWebString(
23 const base::FilePath::StringType& str) {
24 #if defined(OS_POSIX)
25 return WideToUTF16Hack(base::SysNativeMBToWide(str));
26 #elif defined(OS_WIN)
27 return WideToUTF16Hack(str);
28 #endif
29 }
30
31 base::FilePath WebStringToFilePath(const WebKit::WebString& str) {
32 return base::FilePath(WebStringToFilePathString(str));
33 }
34
35 WebKit::WebString FilePathToWebString(const base::FilePath& file_path) {
36 return FilePathStringToWebString(file_path.value());
37 }
38
39 } // namespace webkit_base
OLDNEW
« no previous file with comments | « webkit/base/file_path_string_conversions.h ('k') | webkit/base/origin_url_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698