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

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

Issue 2473093003: Fix up naming in CString. (Closed)
Patch Set: Created 4 years, 1 month 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
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 virtual ~OutputBuffer() {} 49 virtual ~OutputBuffer() {}
50 }; 50 };
51 51
52 class CStringBuffer final : public OutputBuffer { 52 class CStringBuffer final : public OutputBuffer {
53 public: 53 public:
54 CStringBuffer(CString& buffer) : m_buffer(buffer) {} 54 CStringBuffer(CString& buffer) : m_buffer(buffer) {}
55 ~CStringBuffer() override {} 55 ~CStringBuffer() override {}
56 56
57 char* allocate(size_t size) override { 57 char* allocate(size_t size) override {
58 char* ptr; 58 char* ptr;
59 m_buffer = CString::newUninitialized(size, ptr); 59 m_buffer = CString::createUninitialized(size, ptr);
60 return ptr; 60 return ptr;
61 } 61 }
62 62
63 void copy(const CString& source) override { m_buffer = source; } 63 void copy(const CString& source) override { m_buffer = source; }
64 64
65 const CString& buffer() const { return m_buffer; } 65 const CString& buffer() const { return m_buffer; }
66 66
67 private: 67 private:
68 CString m_buffer; 68 CString m_buffer;
69 }; 69 };
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/exported/WebCString.cpp ('k') | third_party/WebKit/Source/wtf/text/CString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698