| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/sync/util/path_helpers.h" | |
| 6 | |
| 7 #include "build/build_config.h" | |
| 8 | |
| 9 #if ((!defined(OS_LINUX)) && (!defined(OS_MACOSX))) | |
| 10 #error Compile this file on Mac OS X or Linux only. | |
| 11 #endif | |
| 12 | |
| 13 using std::string; | |
| 14 | |
| 15 // Convert /s to :s. | |
| 16 string MakePathComponentOSLegal(const string& component) { | |
| 17 if (string::npos == component.find("/")) | |
| 18 return ""; | |
| 19 string new_name(component); | |
| 20 std::replace(new_name.begin(), new_name.end(), '/', ':'); | |
| 21 return new_name; | |
| 22 } | |
| OLD | NEW |