Index: extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc |
diff --git a/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc b/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc |
index 615090a8aca64bb9f7ae2d1a8d6c383ba3b65fd5..430a05c1bf195207c2ffee64091a66d641725c2c 100644 |
--- a/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc |
+++ b/extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc |
@@ -330,7 +330,7 @@ class HeaderMatcher { |
const std::string data_; |
const MatchType type_; |
- const bool case_sensitive_; |
+ const base::CompareCase case_sensitive_; |
DISALLOW_COPY_AND_ASSIGN(StringMatchTest); |
}; |
@@ -422,14 +422,14 @@ bool HeaderMatcher::StringMatchTest::Matches( |
const std::string& str) const { |
switch (type_) { |
case kPrefix: |
- return base::StartsWithASCII(str, data_, case_sensitive_); |
+ return base::StartsWith(str, data_, case_sensitive_); |
case kSuffix: |
return base::EndsWith(str, data_, case_sensitive_); |
case kEquals: |
return str.size() == data_.size() && |
- base::StartsWithASCII(str, data_, case_sensitive_); |
+ base::StartsWith(str, data_, case_sensitive_); |
case kContains: |
- if (!case_sensitive_) { |
+ if (case_sensitive_ == base::CompareCase::INSENSITIVE_ASCII) { |
return std::search(str.begin(), str.end(), data_.begin(), data_.end(), |
CaseInsensitiveCompareASCII<char>()) != str.end(); |
} else { |
@@ -446,7 +446,8 @@ HeaderMatcher::StringMatchTest::StringMatchTest(const std::string& data, |
bool case_sensitive) |
: data_(data), |
type_(type), |
- case_sensitive_(case_sensitive) {} |
+ case_sensitive_(case_sensitive ? base::CompareCase::SENSITIVE |
+ : base::CompareCase::INSENSITIVE_ASCII) {} |
// HeaderMatcher::HeaderMatchTest implementation. |