OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 if (!name.isEmpty()) { | 129 if (!name.isEmpty()) { |
130 name = name.utf8(StrictUTF8Conversion).data(); | 130 name = name.utf8(StrictUTF8Conversion).data(); |
131 validUTF8 = !name.isEmpty(); | 131 validUTF8 = !name.isEmpty(); |
132 } | 132 } |
133 if (validUTF8 && !value.isEmpty()) { | 133 if (validUTF8 && !value.isEmpty()) { |
134 value = value.utf8(StrictUTF8Conversion).data(); | 134 value = value.utf8(StrictUTF8Conversion).data(); |
135 validUTF8 = !value.isEmpty(); | 135 validUTF8 = !value.isEmpty(); |
136 } | 136 } |
137 | 137 |
138 if (validUTF8) | 138 if (validUTF8) |
139 m_fragments.append(std::make_pair(name, value)); | 139 m_fragments.push_back(std::make_pair(name, value)); |
140 | 140 |
141 offset = parameterEnd + 1; | 141 offset = parameterEnd + 1; |
142 } | 142 } |
143 } | 143 } |
144 | 144 |
145 void MediaFragmentURIParser::parseTimeFragment() { | 145 void MediaFragmentURIParser::parseTimeFragment() { |
146 DCHECK_EQ(m_timeFormat, None); | 146 DCHECK_EQ(m_timeFormat, None); |
147 | 147 |
148 if (m_fragments.isEmpty()) | 148 if (m_fragments.isEmpty()) |
149 parseFragments(); | 149 parseFragments(); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 | 309 |
310 if (offset < length && timeString[offset] == '.') | 310 if (offset < length && timeString[offset] == '.') |
311 fraction = collectFraction(timeString, length, offset).toDouble(); | 311 fraction = collectFraction(timeString, length, offset).toDouble(); |
312 | 312 |
313 time = (value1 * secondsPerHour) + (value2 * secondsPerMinute) + value3 + | 313 time = (value1 * secondsPerHour) + (value2 * secondsPerMinute) + value3 + |
314 fraction; | 314 fraction; |
315 return true; | 315 return true; |
316 } | 316 } |
317 | 317 |
318 } // namespace blink | 318 } // namespace blink |
OLD | NEW |