| 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 #include <sys/types.h> | 5 #include <sys/types.h> |
| 6 | 6 |
| 7 #include <glib.h> | |
| 8 #include <string.h> | 7 #include <string.h> |
| 9 | 8 |
| 10 #include "base/logging.h" | 9 #include "base/logging.h" |
| 11 #include "base/port.h" | 10 #include "base/port.h" |
| 12 #include "chrome/browser/sync/util/character_set_converters.h" | 11 #include "chrome/browser/sync/util/character_set_converters.h" |
| 13 #include "chrome/browser/sync/util/path_helpers.h" | 12 #include "chrome/browser/sync/util/path_helpers.h" |
| 14 | 13 |
| 15 #ifndef OS_LINUX | 14 #ifndef OS_LINUX |
| 16 #error Compile this file on Linux only. | 15 #error Compile this file on Linux only. |
| 17 #endif | 16 #endif |
| (...skipping 17 matching lines...) Expand all Loading... |
| 35 // linux. | 34 // linux. |
| 36 return path; | 35 return path; |
| 37 } | 36 } |
| 38 | 37 |
| 39 PathString AppendSlash(const PathString& path) { | 38 PathString AppendSlash(const PathString& path) { |
| 40 if ((!path.empty()) && (*path.rbegin() != '/')) { | 39 if ((!path.empty()) && (*path.rbegin() != '/')) { |
| 41 return path + '/'; | 40 return path + '/'; |
| 42 } | 41 } |
| 43 return path; | 42 return path; |
| 44 } | 43 } |
| 45 | |
| 46 PathString LowercasePath(const PathString& path) { | |
| 47 gchar* ret = g_utf8_strdown(path.c_str(), -1); | |
| 48 PathString retstr(ret); | |
| 49 g_free(ret); | |
| 50 return retstr; | |
| 51 } | |
| OLD | NEW |