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

Unified Diff: chrome/browser/search/contextual_search_promo_source_android.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
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_database.cc ('k') | chrome/browser/search/iframe_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/contextual_search_promo_source_android.cc
diff --git a/chrome/browser/search/contextual_search_promo_source_android.cc b/chrome/browser/search/contextual_search_promo_source_android.cc
index ea6f8c71740dae07ab33090bc3f08e3524f476f6..ec36bbdb63585b1e0ee6e1b542919066dd809fa3 100644
--- a/chrome/browser/search/contextual_search_promo_source_android.cc
+++ b/chrome/browser/search/contextual_search_promo_source_android.cc
@@ -90,13 +90,13 @@ std::string ContextualSearchPromoSourceAndroid::GetSource() const {
std::string ContextualSearchPromoSourceAndroid::GetMimeType(
const std::string& path_and_query) const {
std::string path(GURL("chrome://host/" + path_and_query).path());
- if (EndsWith(path, ".js", false)) return "application/javascript";
- if (EndsWith(path, ".png", false)) return "image/png";
- if (EndsWith(path, ".css", false)) return "text/css";
- if (EndsWith(path, ".html", false)) return "text/html";
- if (EndsWith(path, ".woff", false)) return "font/woff";
- if (EndsWith(path, ".woff2", false)) return "font/woff2";
- return "";
+ if (base::EndsWith(path, ".js", false)) return "application/javascript";
+ if (base::EndsWith(path, ".png", false)) return "image/png";
+ if (base::EndsWith(path, ".css", false)) return "text/css";
+ if (base::EndsWith(path, ".html", false)) return "text/html";
+ if (base::EndsWith(path, ".woff", false)) return "font/woff";
+ if (base::EndsWith(path, ".woff2", false)) return "font/woff2";
+ return std::string();
}
bool ContextualSearchPromoSourceAndroid::ShouldDenyXFrameOptions() const {
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_database.cc ('k') | chrome/browser/search/iframe_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698