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

Unified Diff: sql/connection.cc

Issue 1878083002: Implement IsAsciiUpper and IsAsciiLower in base/strings/string_util.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git sync Created 4 years, 8 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: sql/connection.cc
diff --git a/sql/connection.cc b/sql/connection.cc
index b1be62f586a782d64fca587e671254f912e29493..b17da0dde2f7f00fe199ee72ad37f8dcbadcc5b7 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -116,9 +116,8 @@ int BackupDatabase(sqlite3* src, sqlite3* dst, const char* db_name) {
// just use clean names to start with.
bool ValidAttachmentPoint(const char* attachment_point) {
for (size_t i = 0; attachment_point[i]; ++i) {
- if (!((attachment_point[i] >= '0' && attachment_point[i] <= '9') ||
- (attachment_point[i] >= 'a' && attachment_point[i] <= 'z') ||
- (attachment_point[i] >= 'A' && attachment_point[i] <= 'Z') ||
+ if (!(base::IsAsciiDigit(attachment_point[i]) ||
+ base::IsAsciiAlpha(attachment_point[i]) ||
attachment_point[i] == '_')) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698