OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "webkit/base/file_path_string_conversions.h" | 5 #include "webkit/base/file_path_string_conversions.h" |
6 | 6 |
7 #include "base/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" |
10 | 10 |
11 namespace webkit_base { | 11 namespace webkit_base { |
12 | 12 |
13 base::FilePath::StringType WebStringToFilePathString( | 13 base::FilePath::StringType WebStringToFilePathString( |
14 const WebKit::WebString& str) { | 14 const WebKit::WebString& str) { |
15 #if defined(OS_POSIX) | 15 #if defined(OS_POSIX) |
16 return base::SysWideToNativeMB(UTF16ToWideHack(str)); | 16 return base::SysWideToNativeMB(UTF16ToWideHack(str)); |
17 #elif defined(OS_WIN) | 17 #elif defined(OS_WIN) |
(...skipping 12 matching lines...) Expand all Loading... |
30 | 30 |
31 base::FilePath WebStringToFilePath(const WebKit::WebString& str) { | 31 base::FilePath WebStringToFilePath(const WebKit::WebString& str) { |
32 return base::FilePath(WebStringToFilePathString(str)); | 32 return base::FilePath(WebStringToFilePathString(str)); |
33 } | 33 } |
34 | 34 |
35 WebKit::WebString FilePathToWebString(const base::FilePath& file_path) { | 35 WebKit::WebString FilePathToWebString(const base::FilePath& file_path) { |
36 return FilePathStringToWebString(file_path.value()); | 36 return FilePathStringToWebString(file_path.value()); |
37 } | 37 } |
38 | 38 |
39 } // namespace webkit_base | 39 } // namespace webkit_base |
OLD | NEW |