summaryrefslogtreecommitdiffstats
path: root/dbus/string_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/string_util.cc')
-rw-r--r--dbus/string_util.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/dbus/string_util.cc b/dbus/string_util.cc
index 0b07786..16e483a 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;