| OLD | NEW |
| (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 "third_party/WebKit/public/platform/WebString.h" | |
| 8 | |
| 9 namespace webkit_base { | |
| 10 | |
| 11 base::FilePath::StringType WebStringToFilePathString( | |
| 12 const WebKit::WebString& str) { | |
| 13 return base::FilePath::FromUTF16Unsafe(str).value(); | |
| 14 } | |
| 15 | |
| 16 WebKit::WebString FilePathStringToWebString( | |
| 17 const base::FilePath::StringType& str) { | |
| 18 return base::FilePath(str).AsUTF16Unsafe(); | |
| 19 } | |
| 20 | |
| 21 base::FilePath WebStringToFilePath(const WebKit::WebString& str) { | |
| 22 return base::FilePath::FromUTF16Unsafe(str); | |
| 23 } | |
| 24 | |
| 25 WebKit::WebString FilePathToWebString(const base::FilePath& file_path) { | |
| 26 return file_path.AsUTF16Unsafe(); | |
| 27 } | |
| 28 | |
| 29 } // namespace webkit_base | |
| OLD | NEW |