Chromium Code Reviews

Side by Side Diff: chrome/browser/sync/util/path_helpers_linux.cc

Issue 211019: Fix compiling of sync on linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « chrome/browser/sync/util/path_helpers.h ('k') | chrome/browser/sync/util/path_helpers_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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...)
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 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/util/path_helpers.h ('k') | chrome/browser/sync/util/path_helpers_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine