Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(749)

Side by Side Diff: Source/platform/text/LineEnding.cpp

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/text/LineEnding.h ('k') | Source/platform/text/LocaleICU.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 *q++ = '\n'; 142 *q++ = '\n';
143 } else { 143 } else {
144 // Leave other characters alone. 144 // Leave other characters alone.
145 *q++ = c; 145 *q++ = c;
146 } 146 }
147 } 147 }
148 } 148 }
149 149
150 }; 150 };
151 151
152 namespace WebCore { 152 namespace blink {
153 153
154 void normalizeToCROrLF(const CString& from, Vector<char>& result, bool toCR); 154 void normalizeToCROrLF(const CString& from, Vector<char>& result, bool toCR);
155 155
156 // Normalize all line-endings to CR or LF. 156 // Normalize all line-endings to CR or LF.
157 void normalizeToCROrLF(const CString& from, Vector<char>& result, bool toCR) 157 void normalizeToCROrLF(const CString& from, Vector<char>& result, bool toCR)
158 { 158 {
159 // Compute the new length. 159 // Compute the new length.
160 size_t newLen = 0; 160 size_t newLen = 0;
161 bool needFix = false; 161 bool needFix = false;
162 const char* p = from.data(); 162 const char* p = from.data();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 void normalizeLineEndingsToNative(const CString& from, Vector<char>& result) 227 void normalizeLineEndingsToNative(const CString& from, Vector<char>& result)
228 { 228 {
229 #if OS(WIN) 229 #if OS(WIN)
230 VectorCharAppendBuffer buffer(result); 230 VectorCharAppendBuffer buffer(result);
231 internalNormalizeLineEndingsToCRLF(from, buffer); 231 internalNormalizeLineEndingsToCRLF(from, buffer);
232 #else 232 #else
233 normalizeLineEndingsToLF(from, result); 233 normalizeLineEndingsToLF(from, result);
234 #endif 234 #endif
235 } 235 }
236 236
237 } // namespace WebCore 237 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/text/LineEnding.h ('k') | Source/platform/text/LocaleICU.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698