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

Unified Diff: net/base/filename_util.cc

Issue 2136453004: Reland of place 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 | « media/blink/resource_multibuffer_data_provider.cc ('k') | net/cookies/canonical_cookie.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/filename_util.cc
diff --git a/net/base/filename_util.cc b/net/base/filename_util.cc
index 153ce43d024882f3d48d62fb1c338930a7d50ee1..1e1d51c0e247709b479a2c44095c7ac117bd4176 100644
--- a/net/base/filename_util.cc
+++ b/net/base/filename_util.cc
@@ -174,8 +174,10 @@
if (filename_lower == known_devices[i])
return true;
// Starts with "DEVICE.".
- if (filename_lower.find(std::string(known_devices[i]) + ".") == 0)
+ if (base::StartsWith(filename_lower, std::string(known_devices[i]) + ".",
+ base::CompareCase::SENSITIVE)) {
return true;
+ }
}
static const char* const magic_names[] = {
« no previous file with comments | « media/blink/resource_multibuffer_data_provider.cc ('k') | net/cookies/canonical_cookie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698