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

Unified Diff: storage/common/fileapi/file_system_util.cc

Issue 2127373006: Use base::StartWith() in more places when appropriate. (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
Index: storage/common/fileapi/file_system_util.cc
diff --git a/storage/common/fileapi/file_system_util.cc b/storage/common/fileapi/file_system_util.cc
index 3bb9b14f4f427ad08f9ea0879d17b36e9e9fb1c6..d9858d9c5f25bc4536959910523013f4a4036450 100644
--- a/storage/common/fileapi/file_system_util.cc
+++ b/storage/common/fileapi/file_system_util.cc
@@ -138,7 +138,7 @@ base::FilePath::StringType VirtualPath::GetNormalizedFilePath(
}
bool VirtualPath::IsAbsolute(const base::FilePath::StringType& path) {
- return path.find(kRoot) == 0;
+ return base::StartsWith(path, kRoot, base::CompareCase::SENSITIVE);
}
bool VirtualPath::IsRootPath(const base::FilePath& path) {

Powered by Google App Engine
This is Rietveld 408576698