Index: dbus/string_util.cc |
diff --git a/dbus/string_util.cc b/dbus/string_util.cc |
index 16e483a5feabd3925649dc4f252b4434965b91c1..0b0778603088ccfe3ee649a38c3a1505f1572bc4 100644 |
--- a/dbus/string_util.cc |
+++ b/dbus/string_util.cc |
@@ -8,10 +8,13 @@ |
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::StartsWith(value, "/", base::CompareCase::SENSITIVE)) |
+ if (!base::StartsWithASCII(value, "/", kCaseSensitive)) |
return false; |
// Elements are pieces delimited by '/'. For instance, "org", "chromium", |
@@ -36,8 +39,7 @@ |
} |
// A trailing '/' character is not allowed unless the path is the root path. |
- if (value.size() > 1 && |
- base::EndsWith(value, "/", base::CompareCase::SENSITIVE)) |
+ if (value.size() > 1 && base::EndsWith(value, "/", kCaseSensitive)) |
return false; |
return true; |