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

Unified Diff: media/filters/stream_parser_factory.cc

Issue 1226673003: Move MatchPattern to its own header and the base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/utility/unpacker_unittest.cc ('k') | net/base/host_mapping_rules.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/stream_parser_factory.cc
diff --git a/media/filters/stream_parser_factory.cc b/media/filters/stream_parser_factory.cc
index 1315bd27b2cd50b8ee5559aecda7efb94b3553df..cac29e13380335916b7d7f19e47c62c91e9e7d94 100644
--- a/media/filters/stream_parser_factory.cc
+++ b/media/filters/stream_parser_factory.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/metrics/histogram.h"
+#include "base/strings/pattern.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "media/base/media_switches.h"
@@ -172,9 +173,9 @@ static StreamParser* BuildMP4Parser(
bool has_sbr = false;
for (size_t i = 0; i < codecs.size(); ++i) {
std::string codec_id = codecs[i];
- if (MatchPattern(codec_id, kMPEG2AACLCCodecInfo.pattern)) {
+ if (base::MatchPattern(codec_id, kMPEG2AACLCCodecInfo.pattern)) {
audio_object_types.insert(mp4::kISO_13818_7_AAC_LC);
- } else if (MatchPattern(codec_id, kMPEG4AACCodecInfo.pattern)) {
+ } else if (base::MatchPattern(codec_id, kMPEG4AACCodecInfo.pattern)) {
int audio_object_type = GetMP4AudioObjectType(codec_id, log_cb);
DCHECK_GT(audio_object_type, 0);
@@ -230,7 +231,7 @@ static StreamParser* BuildMP2TParser(
bool has_sbr = false;
for (size_t i = 0; i < codecs.size(); ++i) {
std::string codec_id = codecs[i];
- if (MatchPattern(codec_id, kMPEG4AACCodecInfo.pattern)) {
+ if (base::MatchPattern(codec_id, kMPEG4AACCodecInfo.pattern)) {
int audio_object_type = GetMP4AudioObjectType(codec_id, log_cb);
if (audio_object_type == kAACSBRObjectType ||
audio_object_type == kAACPSObjectType) {
@@ -349,7 +350,7 @@ static bool CheckTypeAndCodecs(
bool found_codec = false;
std::string codec_id = codecs[j];
for (int k = 0; type_info.codecs[k]; ++k) {
- if (MatchPattern(codec_id, type_info.codecs[k]->pattern) &&
+ if (base::MatchPattern(codec_id, type_info.codecs[k]->pattern) &&
(!type_info.codecs[k]->validator ||
type_info.codecs[k]->validator(codec_id, log_cb))) {
found_codec =
« no previous file with comments | « extensions/utility/unpacker_unittest.cc ('k') | net/base/host_mapping_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698