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

Unified Diff: content/browser/webui/shared_resources_data_source.cc

Issue 2131933002: Revert of Replace string::find(prefix) == 0 pattern with base::StartsWith(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « content/browser/iframe_zoom_browsertest.cc ('k') | media/blink/buffered_resource_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/shared_resources_data_source.cc
diff --git a/content/browser/webui/shared_resources_data_source.cc b/content/browser/webui/shared_resources_data_source.cc
index d71556958be6acc1b88b665f23c4160f077e1e48..7e5baf3337e384dbfac72140d9cfdeb299e0679c 100644
--- a/content/browser/webui/shared_resources_data_source.cc
+++ b/content/browser/webui/shared_resources_data_source.cc
@@ -160,10 +160,8 @@
// back.
std::string allowed_origin_prefix = kChromeUIScheme;
allowed_origin_prefix += "://";
- if (!base::StartsWith(origin, allowed_origin_prefix,
- base::CompareCase::SENSITIVE)) {
+ if (origin.find(allowed_origin_prefix) != 0)
return "null";
- }
return origin;
}
« no previous file with comments | « content/browser/iframe_zoom_browsertest.cc ('k') | media/blink/buffered_resource_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698