| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_SYNC_UTIL_CHARACTER_SET_CONVERTERS_H_ | 5 #ifndef CHROME_BROWSER_SYNC_UTIL_CHARACTER_SET_CONVERTERS_H_ |
| 6 #define CHROME_BROWSER_SYNC_UTIL_CHARACTER_SET_CONVERTERS_H_ | 6 #define CHROME_BROWSER_SYNC_UTIL_CHARACTER_SET_CONVERTERS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "chrome/browser/sync/util/sync_types.h" | 11 #include "chrome/browser/sync/util/sync_types.h" |
| 12 | 12 |
| 13 // Need to cast literals (Linux, OSX) | 13 // Need to cast literals (Linux, OSX) |
| 14 #define STRING16_UGLY_DOUBLE_DEFINE_HACK(s) \ | 14 #define STRING16_UGLY_DOUBLE_DEFINE_HACK(s) \ |
| 15 reinterpret_cast<const char16*>(L##s) | 15 reinterpret_cast<const char16*>(L##s) |
| 16 #define STRING16(s) STRING16_UGLY_DOUBLE_DEFINE_HACK(s) | 16 #define STRING16(s) STRING16_UGLY_DOUBLE_DEFINE_HACK(s) |
| 17 | 17 |
| 18 namespace browser_sync { | 18 namespace browser_sync { |
| 19 | 19 |
| 20 // Returns UTF8 string from the given FilePath. | 20 // Returns UTF8 string from the given FilePath. |
| 21 std::string FilePathToUTF8(const FilePath& file_path); | 21 std::string FilePathToUTF8(const FilePath& file_path); |
| 22 | 22 |
| 23 // Returns FilePath from the given UTF8 string. | 23 // Returns FilePath from the given UTF8 string. |
| 24 FilePath UTF8ToFilePath(const std::string& utf8); | 24 FilePath UTF8ToFilePath(const std::string& utf8); |
| 25 | 25 |
| 26 void TrimPathStringToValidCharacter(std::string* string); | |
| 27 | |
| 28 } // namespace browser_sync | 26 } // namespace browser_sync |
| 29 | 27 |
| 30 #endif // CHROME_BROWSER_SYNC_UTIL_CHARACTER_SET_CONVERTERS_H_ | 28 #endif // CHROME_BROWSER_SYNC_UTIL_CHARACTER_SET_CONVERTERS_H_ |
| OLD | NEW |