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 <pwd.h> | 5 #include <pwd.h> |
6 #include <string.h> | 6 #include <string.h> |
7 | 7 |
8 #include "chrome/browser/sync/util/path_helpers.h" | 8 #include "chrome/browser/sync/util/path_helpers.h" |
9 | 9 |
10 #if ((!defined(OS_LINUX)) && (!defined(OS_MACOSX))) | 10 #if ((!defined(OS_LINUX)) && (!defined(OS_MACOSX))) |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 // Convert /s to :s. | 88 // Convert /s to :s. |
89 PathString MakePathComponentOSLegal(const PathString& component) { | 89 PathString MakePathComponentOSLegal(const PathString& component) { |
90 if (PathString::npos == component.find("/")) | 90 if (PathString::npos == component.find("/")) |
91 return PSTR(""); | 91 return PSTR(""); |
92 PathString new_name; | 92 PathString new_name; |
93 new_name.reserve(component.size()); | 93 new_name.reserve(component.size()); |
94 StringReplace(component, "/", ":", true, &new_name); | 94 StringReplace(component, "/", ":", true, &new_name); |
95 return new_name; | 95 return new_name; |
96 } | 96 } |
OLD | NEW |