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

Side by Side Diff: chrome/browser/sync/util/path_helpers-posix.cc

Issue 200076: Fix one more checkdeps path. Left this out... (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
« no previous file with comments | « no previous file | no next file » | 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 <pwd.h> 5 #include <pwd.h>
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/port.h"
10 #include "chrome/browser/sync/util/path_helpers.h" 9 #include "chrome/browser/sync/util/path_helpers.h"
11 #include "strings/strutil.h"
12 10
13 #if ((!defined(OS_LINUX)) && (!defined(OS_MACOSX))) 11 #if ((!defined(OS_LINUX)) && (!defined(OS_MACOSX)))
14 #error Compile this file on Mac OS X or Linux only. 12 #error Compile this file on Mac OS X or Linux only.
15 #endif 13 #endif
16 14
17 PathString ExpandTilde(const PathString& path) { 15 PathString ExpandTilde(const PathString& path) {
18 if (path.empty()) 16 if (path.empty())
19 return path; 17 return path;
20 if ('~' != path[0]) 18 if ('~' != path[0])
21 return path; 19 return path;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 88
91 // Convert /s to :s . 89 // Convert /s to :s .
92 PathString MakePathComponentOSLegal(const PathString& component) { 90 PathString MakePathComponentOSLegal(const PathString& component) {
93 if (PathString::npos == component.find("/")) 91 if (PathString::npos == component.find("/"))
94 return PSTR(""); 92 return PSTR("");
95 PathString new_name; 93 PathString new_name;
96 new_name.reserve(component.size()); 94 new_name.reserve(component.size());
97 StringReplace(component, "/", ":", true, &new_name); 95 StringReplace(component, "/", ":", true, &new_name);
98 return new_name; 96 return new_name;
99 } 97 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698