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

Unified Diff: chrome/renderer/content_settings_observer.cc

Issue 1182183003: Move EndsWith to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
Index: chrome/renderer/content_settings_observer.cc
diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc
index af4158b9a5d11aef91336615c6a2f0b809291629..94654b25dca8a6f9c6d3088ee8930f8449a4e935 100644
--- a/chrome/renderer/content_settings_observer.cc
+++ b/chrome/renderer/content_settings_observer.cc
@@ -107,7 +107,7 @@ static const char kDotHTML[] = ".html";
static const char kGoogleDotCom[] = "google.com";
static bool IsHostInDomain(const std::string& host, const std::string& domain) {
- return (EndsWith(host, domain, false) &&
+ return (base::EndsWith(host, domain, false) &&
(host.length() == domain.length() ||
(host.length() > domain.length() &&
host[host.length() - domain.length() - 1] == '.')));
@@ -509,7 +509,7 @@ bool ContentSettingsObserver::allowDisplayingInsecureContent(
}
GURL resource_gurl(resource_url);
- if (EndsWith(resource_gurl.path(), kDotHTML, false))
+ if (base::EndsWith(resource_gurl.path(), kDotHTML, false))
SendInsecureContentSignal(INSECURE_CONTENT_DISPLAY_HTML);
if (allowed_per_settings || allow_displaying_insecure_content_)
@@ -564,7 +564,7 @@ bool ContentSettingsObserver::allowRunningInsecureContent(
SendInsecureContentSignal(INSECURE_CONTENT_RUN_HOST_MAPS_GOOGLE);
} else if (origin_host == kWWWDotYoutubeDotCom) {
SendInsecureContentSignal(INSECURE_CONTENT_RUN_HOST_YOUTUBE);
- } else if (EndsWith(origin_host, kDotGoogleUserContentDotCom, false)) {
+ } else if (base::EndsWith(origin_host, kDotGoogleUserContentDotCom, false)) {
SendInsecureContentSignal(INSECURE_CONTENT_RUN_HOST_GOOGLEUSERCONTENT);
}
@@ -572,11 +572,11 @@ bool ContentSettingsObserver::allowRunningInsecureContent(
if (resource_gurl.host() == kWWWDotYoutubeDotCom)
SendInsecureContentSignal(INSECURE_CONTENT_RUN_TARGET_YOUTUBE);
- if (EndsWith(resource_gurl.path(), kDotJS, false))
+ if (base::EndsWith(resource_gurl.path(), kDotJS, false))
SendInsecureContentSignal(INSECURE_CONTENT_RUN_JS);
- else if (EndsWith(resource_gurl.path(), kDotCSS, false))
+ else if (base::EndsWith(resource_gurl.path(), kDotCSS, false))
SendInsecureContentSignal(INSECURE_CONTENT_RUN_CSS);
- else if (EndsWith(resource_gurl.path(), kDotSWF, false))
+ else if (base::EndsWith(resource_gurl.path(), kDotSWF, false))
SendInsecureContentSignal(INSECURE_CONTENT_RUN_SWF);
if (!allow_running_insecure_content_ && !allowed_per_settings) {
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.cc ('k') | components/devtools_http_handler/devtools_http_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698