From a7ff1b291cd328e9584779a4bb9101fa9a3c01ad Mon Sep 17 00:00:00 2001 From: brettw Date: Thu, 16 Jul 2015 10:49:29 -0700 Subject: Remove some legacy versions of StartsWith and EndsWith. This just replaces true -> base::CompareCase::SENSITIVE false -> base::CompareCase::INSENSITIVE_ASCII I checked the insensitive cases to make sure they're not doing anything suspicious. The old version is a sometimes-correct Unicode comparison so converting to INSENSTITIVE_ASCII isn't a no-op. However, generally the prefix/suffix checking is done against a hardcoded string so there were very few cases to actually look at. extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc has a not-quite search-and-replace change where I changed the type of a class variable. BUG=506255 TBR=jam Reland of http://crrev.com/1239493005 Review URL: https://codereview.chromium.org/1233043003 Cr-Commit-Position: refs/heads/master@{#339071} --- extensions/utility/unpacker_unittest.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'extensions/utility') diff --git a/extensions/utility/unpacker_unittest.cc b/extensions/utility/unpacker_unittest.cc index bb99aae..82e5a1f7 100644 --- a/extensions/utility/unpacker_unittest.cc +++ b/extensions/utility/unpacker_unittest.cc @@ -171,7 +171,8 @@ TEST_F(UnpackerTest, BadPathError) { EXPECT_FALSE(unpacker_->Run()); EXPECT_TRUE(base::StartsWith(unpacker_->error_message(), - ASCIIToUTF16(kExpected), false)) + ASCIIToUTF16(kExpected), + base::CompareCase::INSENSITIVE_ASCII)) << "Expected prefix: \"" << kExpected << "\", actual error: \"" << unpacker_->error_message() << "\""; } @@ -181,7 +182,8 @@ TEST_F(UnpackerTest, ImageDecodingError) { SetupUnpacker("bad_image.crx"); EXPECT_FALSE(unpacker_->Run()); EXPECT_TRUE(base::StartsWith(unpacker_->error_message(), - ASCIIToUTF16(kExpected), false)) + ASCIIToUTF16(kExpected), + base::CompareCase::INSENSITIVE_ASCII)) << "Expected prefix: \"" << kExpected << "\", actual error: \"" << unpacker_->error_message() << "\""; } -- cgit v1.1