| 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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 CString normalizeLineEndingsToCRLF(const CString& from) { | 196 CString normalizeLineEndingsToCRLF(const CString& from) { |
| 197 if (!from.length()) | 197 if (!from.length()) |
| 198 return from; | 198 return from; |
| 199 CString result; | 199 CString result; |
| 200 CStringBuffer buffer(result); | 200 CStringBuffer buffer(result); |
| 201 internalNormalizeLineEndingsToCRLF(from, buffer); | 201 internalNormalizeLineEndingsToCRLF(from, buffer); |
| 202 return buffer.buffer(); | 202 return buffer.buffer(); |
| 203 } | 203 } |
| 204 | 204 |
| 205 void normalizeLineEndingsToNative(const CString& from, Vector<char>& result) { | |
| 206 #if OS(WIN) | |
| 207 VectorCharAppendBuffer buffer(result); | |
| 208 internalNormalizeLineEndingsToCRLF(from, buffer); | |
| 209 #else | |
| 210 normalizeLineEndingsToLF(from, result); | |
| 211 #endif | |
| 212 } | |
| 213 | |
| 214 } // namespace blink | 205 } // namespace blink |
| OLD | NEW |