Chromium Code Reviews

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index f8779f4b223d93ee564b07599f45c2e96763e64f..03325bbdcf05bfe46a2e790b4b56c199f199d994 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -1481,10 +1481,14 @@ bool ChromeContentRendererClient::AllowPepperMediaStreamAPI(
// these APIs are public and stable.
std::string url_host = url.host();
if (url.SchemeIs("https") &&
- (base::EndsWith(url_host, "talkgadget.google.com", false) ||
- base::EndsWith(url_host, "plus.google.com", false) ||
- base::EndsWith(url_host, "plus.sandbox.google.com", false)) &&
- base::StartsWithASCII(url.path(), "/hangouts/", false)) {
+ (base::EndsWith(url_host, "talkgadget.google.com",
+ base::CompareCase::INSENSITIVE_ASCII) ||
+ base::EndsWith(url_host, "plus.google.com",
+ base::CompareCase::INSENSITIVE_ASCII) ||
+ base::EndsWith(url_host, "plus.sandbox.google.com",
+ base::CompareCase::INSENSITIVE_ASCII)) &&
+ base::StartsWith(url.path(), "/hangouts/",
+ base::CompareCase::INSENSITIVE_ASCII)) {
return true;
}
// Allow access for tests.

Powered by Google App Engine