| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 CString normalizeLineEndingsToCRLF(const CString& from) | 208 CString normalizeLineEndingsToCRLF(const CString& from) |
| 209 { | 209 { |
| 210 if (!from.length()) | 210 if (!from.length()) |
| 211 return from; | 211 return from; |
| 212 CString result; | 212 CString result; |
| 213 CStringBuffer buffer(result); | 213 CStringBuffer buffer(result); |
| 214 internalNormalizeLineEndingsToCRLF(from, buffer); | 214 internalNormalizeLineEndingsToCRLF(from, buffer); |
| 215 return buffer.buffer(); | 215 return buffer.buffer(); |
| 216 } | 216 } |
| 217 | 217 |
| 218 void normalizeLineEndingsToNative(const CString& from, Vector<char>& result) | |
| 219 { | |
| 220 #if OS(WIN) | |
| 221 VectorCharAppendBuffer buffer(result); | |
| 222 internalNormalizeLineEndingsToCRLF(from, buffer); | |
| 223 #else | |
| 224 normalizeLineEndingsToLF(from, result); | |
| 225 #endif | |
| 226 } | |
| 227 | |
| 228 } // namespace blink | 218 } // namespace blink |
| OLD | NEW |