| Index: content/common/gpu/media/video_decode_accelerator_unittest.cc
|
| diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc
|
| index 0605fb04aeccc612b14c893bf1daa245f6ff2ba6..04978bc61837ff06367d3a15e2894cbb817dbab4 100644
|
| --- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
|
| +++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
|
| @@ -180,23 +180,23 @@
|
| filepath = filepath.AddExtension(FILE_PATH_LITERAL(".md5"));
|
| std::string all_md5s;
|
| base::ReadFileToString(filepath, &all_md5s);
|
| - *md5_strings = base::SplitString(
|
| - all_md5s, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
|
| + base::SplitString(all_md5s, '\n', md5_strings);
|
| // Check these are legitimate MD5s.
|
| - for (const std::string& md5_string : *md5_strings) {
|
| + for (std::vector<std::string>::iterator md5_string = md5_strings->begin();
|
| + md5_string != md5_strings->end(); ++md5_string) {
|
| // Ignore the empty string added by SplitString
|
| - if (!md5_string.length())
|
| + if (!md5_string->length())
|
| continue;
|
| // Ignore comments
|
| - if (md5_string.at(0) == '#')
|
| + if (md5_string->at(0) == '#')
|
| continue;
|
|
|
| - CHECK_EQ(static_cast<int>(md5_string.length()),
|
| - kMD5StringLength) << md5_string;
|
| - bool hex_only = std::count_if(md5_string.begin(),
|
| - md5_string.end(), isxdigit) ==
|
| + CHECK_EQ(static_cast<int>(md5_string->length()),
|
| + kMD5StringLength) << *md5_string;
|
| + bool hex_only = std::count_if(md5_string->begin(),
|
| + md5_string->end(), isxdigit) ==
|
| kMD5StringLength;
|
| - CHECK(hex_only) << md5_string;
|
| + CHECK(hex_only) << *md5_string;
|
| }
|
| CHECK_GE(md5_strings->size(), 1U) << " MD5 checksum file ("
|
| << filepath.MaybeAsASCII()
|
| @@ -1061,14 +1061,12 @@
|
| void VideoDecodeAcceleratorTest::ParseAndReadTestVideoData(
|
| base::FilePath::StringType data,
|
| std::vector<TestVideoFile*>* test_video_files) {
|
| - std::vector<base::FilePath::StringType> entries = base::SplitString(
|
| - data, base::FilePath::StringType(1, ';'),
|
| - base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
|
| + std::vector<base::FilePath::StringType> entries;
|
| + base::SplitString(data, ';', &entries);
|
| CHECK_GE(entries.size(), 1U) << data;
|
| for (size_t index = 0; index < entries.size(); ++index) {
|
| - std::vector<base::FilePath::StringType> fields = base::SplitString(
|
| - entries[index], base::FilePath::StringType(1, ':'),
|
| - base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
|
| + std::vector<base::FilePath::StringType> fields;
|
| + base::SplitString(entries[index], ':', &fields);
|
| CHECK_GE(fields.size(), 1U) << entries[index];
|
| CHECK_LE(fields.size(), 8U) << entries[index];
|
| TestVideoFile* video_file = new TestVideoFile(fields[0]);
|
|
|