| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 return nullptr; | 296 return nullptr; |
| 297 } | 297 } |
| 298 content->Append(part); | 298 content->Append(part); |
| 299 line_reader_.SetSeparator("\r\n"); | 299 line_reader_.SetSeparator("\r\n"); |
| 300 Vector<char> next_chars; | 300 Vector<char> next_chars; |
| 301 if (line_reader_.Peek(next_chars, 2) != 2) { | 301 if (line_reader_.Peek(next_chars, 2) != 2) { |
| 302 DVLOG(1) << "Invalid seperator."; | 302 DVLOG(1) << "Invalid seperator."; |
| 303 return nullptr; | 303 return nullptr; |
| 304 } | 304 } |
| 305 end_of_part_reached = true; | 305 end_of_part_reached = true; |
| 306 DCHECK_EQ(next_chars.size(), 2UL); | 306 DCHECK(next_chars.size() == 2); |
| 307 end_of_archive_reached = (next_chars[0] == '-' && next_chars[1] == '-'); | 307 end_of_archive_reached = (next_chars[0] == '-' && next_chars[1] == '-'); |
| 308 if (!end_of_archive_reached) { | 308 if (!end_of_archive_reached) { |
| 309 String line = line_reader_.NextChunkAsUTF8StringWithLatin1Fallback(); | 309 String line = line_reader_.NextChunkAsUTF8StringWithLatin1Fallback(); |
| 310 if (!line.IsEmpty()) { | 310 if (!line.IsEmpty()) { |
| 311 DVLOG(1) << "No CRLF at end of binary section."; | 311 DVLOG(1) << "No CRLF at end of binary section."; |
| 312 return nullptr; | 312 return nullptr; |
| 313 } | 313 } |
| 314 } | 314 } |
| 315 } else { | 315 } else { |
| 316 String line; | 316 String line; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 if (!content_id.StartsWith('<') || !content_id.EndsWith('>')) | 386 if (!content_id.StartsWith('<') || !content_id.EndsWith('>')) |
| 387 return KURL(); | 387 return KURL(); |
| 388 | 388 |
| 389 StringBuilder uri_builder; | 389 StringBuilder uri_builder; |
| 390 uri_builder.Append("cid:"); | 390 uri_builder.Append("cid:"); |
| 391 uri_builder.Append(content_id, 1, content_id.length() - 2); | 391 uri_builder.Append(content_id, 1, content_id.length() - 2); |
| 392 return KURL(KURL(), uri_builder.ToString()); | 392 return KURL(KURL(), uri_builder.ToString()); |
| 393 } | 393 } |
| 394 | 394 |
| 395 } // namespace blink | 395 } // namespace blink |
| OLD | NEW |