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 "chrome/browser/sync/util/character_set_converters.h" | 5 #include "chrome/browser/sync/util/character_set_converters.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void TrimPathStringToValidCharacter(PathString* string) { | 53 void TrimPathStringToValidCharacter(PathString* string) { |
54 CHECK(string); | 54 CHECK(string); |
55 // Constants from http://en.wikipedia.org/wiki/UTF-16 | 55 // Constants from http://en.wikipedia.org/wiki/UTF-16 |
56 if (string->empty()) | 56 if (string->empty()) |
57 return; | 57 return; |
58 if (0x0dc00 == (string->at(string->length() - 1) & 0x0fc00)) | 58 if (0x0dc00 == (string->at(string->length() - 1) & 0x0fc00)) |
59 string->resize(string->length() - 1); | 59 string->resize(string->length() - 1); |
60 } | 60 } |
61 | 61 |
62 } // namespace browser_sync | 62 } // namespace browser_sync |
OLD | NEW |