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 13 matching lines...) Expand all Loading... |
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 #include "platform/text/LineEnding.h" | 32 #include "platform/text/LineEnding.h" |
33 | 33 |
34 #include "wtf/Allocator.h" | 34 #include "platform/wtf/Allocator.h" |
35 #include "wtf/Noncopyable.h" | 35 #include "platform/wtf/Noncopyable.h" |
36 #include "wtf/text/CString.h" | 36 #include "platform/wtf/text/CString.h" |
37 #include "wtf/text/WTFString.h" | 37 #include "platform/wtf/text/WTFString.h" |
38 | 38 |
39 namespace { | 39 namespace { |
40 | 40 |
41 class OutputBuffer { | 41 class OutputBuffer { |
42 STACK_ALLOCATED(); | 42 STACK_ALLOCATED(); |
43 WTF_MAKE_NONCOPYABLE(OutputBuffer); | 43 WTF_MAKE_NONCOPYABLE(OutputBuffer); |
44 | 44 |
45 public: | 45 public: |
46 OutputBuffer() {} | 46 OutputBuffer() {} |
47 virtual char* allocate(size_t) = 0; | 47 virtual char* allocate(size_t) = 0; |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 void normalizeLineEndingsToNative(const CString& from, Vector<char>& result) { | 205 void normalizeLineEndingsToNative(const CString& from, Vector<char>& result) { |
206 #if OS(WIN) | 206 #if OS(WIN) |
207 VectorCharAppendBuffer buffer(result); | 207 VectorCharAppendBuffer buffer(result); |
208 internalNormalizeLineEndingsToCRLF(from, buffer); | 208 internalNormalizeLineEndingsToCRLF(from, buffer); |
209 #else | 209 #else |
210 normalizeLineEndingsToLF(from, result); | 210 normalizeLineEndingsToLF(from, result); |
211 #endif | 211 #endif |
212 } | 212 } |
213 | 213 |
214 } // namespace blink | 214 } // namespace blink |
OLD | NEW |