Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: chrome/browser/sync/util/path_helpers.h

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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_SYNC_UTIL_PATH_HELPERS_H_ 5 #ifndef CHROME_BROWSER_SYNC_UTIL_PATH_HELPERS_H_
6 #define CHROME_BROWSER_SYNC_UTIL_PATH_HELPERS_H_ 6 #define CHROME_BROWSER_SYNC_UTIL_PATH_HELPERS_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <iterator> 9 #include <iterator>
10 #include <string> 10 #include <string>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 typename StringType::size_type segment_end_; 65 typename StringType::size_type segment_end_;
66 StringType value_; 66 StringType value_;
67 }; 67 };
68 68
69 // NOTE: The functions (Strip)LastPathSegment always return values without a 69 // NOTE: The functions (Strip)LastPathSegment always return values without a
70 // trailing slash. 70 // trailing slash.
71 PathString LastPathSegment(const PathString& path); 71 PathString LastPathSegment(const PathString& path);
72 std::string LastPathSegment(const std::string& path); 72 std::string LastPathSegment(const std::string& path);
73 PathString AppendSlash(const PathString& path); 73 PathString AppendSlash(const PathString& path);
74 PathString GetFullPath(const PathString& path); 74 PathString GetFullPath(const PathString& path);
75 PathString LowercasePath(const PathString& path);
76 PathString ExpandTilde(const PathString& path); 75 PathString ExpandTilde(const PathString& path);
77 76
78 inline bool HasSuffixPathString(const PathString& str, 77 inline bool HasSuffixPathString(const PathString& str,
79 const PathString& suffix) { 78 const PathString& suffix) {
80 return str.find(suffix, str.size() - suffix.size()) != PathString::npos; 79 return str.find(suffix, str.size() - suffix.size()) != PathString::npos;
81 } 80 }
82 81
83 inline PathString StripSuffixPathString(const PathString& str, 82 inline PathString StripSuffixPathString(const PathString& str,
84 const PathString& suffix) { 83 const PathString& suffix) {
85 PathString ret(str); 84 PathString ret(str);
(...skipping 10 matching lines...) Expand all
96 // Makes a path component legal for your OS, but doesn't handle collisions 95 // Makes a path component legal for your OS, but doesn't handle collisions
97 // with other files in the same directory. it can do this by removing 96 // with other files in the same directory. it can do this by removing
98 // illegal characters and adding ~1 before the first '.' in the filename. 97 // illegal characters and adding ~1 before the first '.' in the filename.
99 // returns PSTR("") if the name is fine as-is 98 // returns PSTR("") if the name is fine as-is
100 // on mac/linux we let names stay unicode normalization form C in the system 99 // on mac/linux we let names stay unicode normalization form C in the system
101 // and convert to another normal form in fuse handlers. but, if a '/' is in 100 // and convert to another normal form in fuse handlers. but, if a '/' is in
102 // a filename, we handle it here. 101 // a filename, we handle it here.
103 PathString MakePathComponentOSLegal(const PathString& component); 102 PathString MakePathComponentOSLegal(const PathString& component);
104 103
105 #endif // CHROME_BROWSER_SYNC_UTIL_PATH_HELPERS_H_ 104 #endif // CHROME_BROWSER_SYNC_UTIL_PATH_HELPERS_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/util/event_sys-inl.h ('k') | chrome/browser/sync/util/path_helpers_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698