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

Unified Diff: storage/browser/fileapi/sandbox_directory_database.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 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 | « storage/browser/fileapi/obfuscated_file_util.cc ('k') | storage/browser/fileapi/sandbox_origin_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/fileapi/sandbox_directory_database.cc
diff --git a/storage/browser/fileapi/sandbox_directory_database.cc b/storage/browser/fileapi/sandbox_directory_database.cc
index 7f7a707d63997b622dc71834a7f1a2ca7f7ae0eb..39f1d5386a0272429ffba0f09d2b559d1a19c119 100644
--- a/storage/browser/fileapi/sandbox_directory_database.cc
+++ b/storage/browser/fileapi/sandbox_directory_database.cc
@@ -204,7 +204,8 @@ bool DatabaseCheckHelper::ScanDatabase() {
scoped_ptr<leveldb::Iterator> itr(db_->NewIterator(leveldb::ReadOptions()));
for (itr->SeekToFirst(); itr->Valid(); itr->Next()) {
std::string key = itr->key().ToString();
- if (base::StartsWithASCII(key, kChildLookupPrefix, true)) {
+ if (base::StartsWith(key, kChildLookupPrefix,
+ base::CompareCase::SENSITIVE)) {
// key: "CHILD_OF:<parent_id>:<name>"
// value: "<child_id>"
++num_hierarchy_links_in_db_;
@@ -479,8 +480,9 @@ bool SandboxDirectoryDatabase::ListChildren(
scoped_ptr<leveldb::Iterator> iter(db_->NewIterator(leveldb::ReadOptions()));
iter->Seek(child_key_prefix);
children->clear();
- while (iter->Valid() && base::StartsWithASCII(iter->key().ToString(),
- child_key_prefix, true)) {
+ while (iter->Valid() && base::StartsWith(iter->key().ToString(),
+ child_key_prefix,
+ base::CompareCase::SENSITIVE)) {
std::string child_id_string = iter->value().ToString();
FileId child_id;
if (!base::StringToInt64(child_id_string, &child_id)) {
« no previous file with comments | « storage/browser/fileapi/obfuscated_file_util.cc ('k') | storage/browser/fileapi/sandbox_origin_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698