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

Unified Diff: dbus/string_util.cc

Issue 1233043003: Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: dbus/string_util.cc
diff --git a/dbus/string_util.cc b/dbus/string_util.cc
index 0b0778603088ccfe3ee649a38c3a1505f1572bc4..16e483a5feabd3925649dc4f252b4434965b91c1 100644
--- a/dbus/string_util.cc
+++ b/dbus/string_util.cc
@@ -8,13 +8,10 @@
namespace dbus {
+// This implementation is based upon D-Bus Specification Version 0.19.
bool IsValidObjectPath(const std::string& value) {
- // This implementation is based upon D-Bus Specification Version 0.19.
-
- const bool kCaseSensitive = true;
-
// A valid object path begins with '/'.
- if (!base::StartsWithASCII(value, "/", kCaseSensitive))
+ if (!base::StartsWith(value, "/", base::CompareCase::SENSITIVE))
return false;
// Elements are pieces delimited by '/'. For instance, "org", "chromium",
@@ -39,7 +36,8 @@ bool IsValidObjectPath(const std::string& value) {
}
// A trailing '/' character is not allowed unless the path is the root path.
- if (value.size() > 1 && base::EndsWith(value, "/", kCaseSensitive))
+ if (value.size() > 1 &&
+ base::EndsWith(value, "/", base::CompareCase::SENSITIVE))
return false;
return true;
« no previous file with comments | « content/common/set_process_title.cc ('k') | extensions/browser/api/declarative_webrequest/webrequest_condition_attribute.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698