| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <algorithm> | 5 #include <algorithm> |
| 6 #include <iterator> | 6 #include <iterator> |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 case MimeUtil::MPEG2_AAC_MAIN: | 468 case MimeUtil::MPEG2_AAC_MAIN: |
| 469 case MimeUtil::MPEG2_AAC_SSR: | 469 case MimeUtil::MPEG2_AAC_SSR: |
| 470 // MPEG-2 variants of AAC are not supported on Android. | 470 // MPEG-2 variants of AAC are not supported on Android. |
| 471 return false; | 471 return false; |
| 472 | 472 |
| 473 case MimeUtil::VP9: | 473 case MimeUtil::VP9: |
| 474 // VP9 is supported only in KitKat+ (API Level 19). | 474 // VP9 is supported only in KitKat+ (API Level 19). |
| 475 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; | 475 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; |
| 476 | 476 |
| 477 case MimeUtil::OPUS: | 477 case MimeUtil::OPUS: |
| 478 // Opus is supported only in Lollipop+ (API Level 21). | 478 // TODO(vigneshv): Change this similar to the VP9 check once Opus is |
| 479 return base::android::BuildInfo::GetInstance()->sdk_int() >= 21; | 479 // supported on Android (http://crbug.com/318436). |
| 480 return false; |
| 480 | 481 |
| 481 case MimeUtil::THEORA: | 482 case MimeUtil::THEORA: |
| 482 return false; | 483 return false; |
| 483 } | 484 } |
| 484 | 485 |
| 485 return false; | 486 return false; |
| 486 } | 487 } |
| 487 | 488 |
| 488 static bool IsMimeTypeSupportedOnAndroid(const std::string& mimeType) { | 489 static bool IsMimeTypeSupportedOnAndroid(const std::string& mimeType) { |
| 489 // HLS codecs are supported in ICS and above (API level 14) | 490 // HLS codecs are supported in ICS and above (API level 14) |
| (...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1378 post_data->append("\r\n" + value + "\r\n"); | 1379 post_data->append("\r\n" + value + "\r\n"); |
| 1379 } | 1380 } |
| 1380 | 1381 |
| 1381 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, | 1382 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, |
| 1382 std::string* post_data) { | 1383 std::string* post_data) { |
| 1383 DCHECK(post_data); | 1384 DCHECK(post_data); |
| 1384 post_data->append("--" + mime_boundary + "--\r\n"); | 1385 post_data->append("--" + mime_boundary + "--\r\n"); |
| 1385 } | 1386 } |
| 1386 | 1387 |
| 1387 } // namespace net | 1388 } // namespace net |
| OLD | NEW |