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

Side by Side Diff: third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp

Issue 2143483002: Use the single char overload of append() when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 MediaSource::logAndThrowDOMException(exceptionState, InvalidStateError, "This SourceBuffer is still processing an 'appendBuffer', 'appendStream', or 're move' operation."); 78 MediaSource::logAndThrowDOMException(exceptionState, InvalidStateError, "This SourceBuffer is still processing an 'appendBuffer', 'appendStream', or 're move' operation.");
79 return true; 79 return true;
80 } 80 }
81 81
82 return false; 82 return false;
83 } 83 }
84 84
85 WTF::String webTimeRangesToString(const WebTimeRanges& ranges) 85 WTF::String webTimeRangesToString(const WebTimeRanges& ranges)
86 { 86 {
87 StringBuilder stringBuilder; 87 StringBuilder stringBuilder;
88 stringBuilder.append("{"); 88 stringBuilder.append('{');
89 for (auto& r : ranges) { 89 for (auto& r : ranges) {
90 stringBuilder.append(" ["); 90 stringBuilder.append(" [");
91 stringBuilder.appendNumber(r.start); 91 stringBuilder.appendNumber(r.start);
92 stringBuilder.append(";"); 92 stringBuilder.append(';');
93 stringBuilder.appendNumber(r.end); 93 stringBuilder.appendNumber(r.end);
94 stringBuilder.append("]"); 94 stringBuilder.append(']');
95 } 95 }
96 stringBuilder.append(" }"); 96 stringBuilder.append(" }");
97 return stringBuilder.toString(); 97 return stringBuilder.toString();
98 } 98 }
99 99
100 } // namespace 100 } // namespace
101 101
102 SourceBuffer* SourceBuffer::create(std::unique_ptr<WebSourceBuffer> webSourceBuf fer, MediaSource* source, GenericEventQueue* asyncEventQueue) 102 SourceBuffer* SourceBuffer::create(std::unique_ptr<WebSourceBuffer> webSourceBuf fer, MediaSource* source, GenericEventQueue* asyncEventQueue)
103 { 103 {
104 SourceBuffer* sourceBuffer = new SourceBuffer(std::move(webSourceBuffer), so urce, asyncEventQueue); 104 SourceBuffer* sourceBuffer = new SourceBuffer(std::move(webSourceBuffer), so urce, asyncEventQueue);
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 visitor->trace(m_removeAsyncPartRunner); 1259 visitor->trace(m_removeAsyncPartRunner);
1260 visitor->trace(m_appendStreamAsyncPartRunner); 1260 visitor->trace(m_appendStreamAsyncPartRunner);
1261 visitor->trace(m_stream); 1261 visitor->trace(m_stream);
1262 visitor->trace(m_audioTracks); 1262 visitor->trace(m_audioTracks);
1263 visitor->trace(m_videoTracks); 1263 visitor->trace(m_videoTracks);
1264 EventTargetWithInlineData::trace(visitor); 1264 EventTargetWithInlineData::trace(visitor);
1265 ActiveDOMObject::trace(visitor); 1265 ActiveDOMObject::trace(visitor);
1266 } 1266 }
1267 1267
1268 } // namespace blink 1268 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698