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

Side by Side Diff: Source/platform/blob/BlobData.cpp

Issue 458313005: Cleanup namespace usage from animation to exported in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleanup namespace usage from animation to exported in platform/ Created 6 years, 4 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
« no previous file with comments | « Source/platform/audio/ReverbConvolver.cpp ('k') | Source/platform/blob/BlobRegistry.cpp » ('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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 m_items.append(BlobDataItem(url, offset, length, expectedModificationTime)); 99 m_items.append(BlobDataItem(url, offset, length, expectedModificationTime));
100 } 100 }
101 101
102 void BlobData::appendText(const String& text, bool doNormalizeLineEndingsToNativ e) 102 void BlobData::appendText(const String& text, bool doNormalizeLineEndingsToNativ e)
103 { 103 {
104 RefPtr<RawData> data = RawData::create(); 104 RefPtr<RawData> data = RawData::create();
105 Vector<char>* buffer = data->mutableData(); 105 Vector<char>* buffer = data->mutableData();
106 106
107 CString utf8Text = UTF8Encoding().normalizeAndEncode(text, WTF::EntitiesForU nencodables); 107 CString utf8Text = UTF8Encoding().normalizeAndEncode(text, WTF::EntitiesForU nencodables);
108 if (doNormalizeLineEndingsToNative) { 108 if (doNormalizeLineEndingsToNative) {
109 blink::normalizeLineEndingsToNative(utf8Text, *buffer); 109 normalizeLineEndingsToNative(utf8Text, *buffer);
110 } else { 110 } else {
111 buffer->append(utf8Text.data(), utf8Text.length()); 111 buffer->append(utf8Text.data(), utf8Text.length());
112 } 112 }
113 113
114 m_items.append(BlobDataItem(data.release())); 114 m_items.append(BlobDataItem(data.release()));
115 } 115 }
116 116
117 void BlobData::appendBytes(const void* bytes, long long length) 117 void BlobData::appendBytes(const void* bytes, long long length)
118 { 118 {
119 RefPtr<RawData> data = RawData::create(); 119 RefPtr<RawData> data = RawData::create();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 { 184 {
185 BlobRegistry::addBlobDataRef(m_uuid); 185 BlobRegistry::addBlobDataRef(m_uuid);
186 } 186 }
187 187
188 BlobDataHandle::~BlobDataHandle() 188 BlobDataHandle::~BlobDataHandle()
189 { 189 {
190 BlobRegistry::removeBlobDataRef(m_uuid); 190 BlobRegistry::removeBlobDataRef(m_uuid);
191 } 191 }
192 192
193 } // namespace blink 193 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/audio/ReverbConvolver.cpp ('k') | Source/platform/blob/BlobRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698