Index: chrome/browser/extensions/api/messaging/native_messaging_host_manifest.cc |
diff --git a/chrome/browser/extensions/api/messaging/native_messaging_host_manifest.cc b/chrome/browser/extensions/api/messaging/native_messaging_host_manifest.cc |
index 27a6f99a2c18a37b2a1c3a358e2ed7689836bf71..e54984f45d9bdd288e1c4d3ba4d942a3a29c5dab 100644 |
--- a/chrome/browser/extensions/api/messaging/native_messaging_host_manifest.cc |
+++ b/chrome/browser/extensions/api/messaging/native_messaging_host_manifest.cc |
@@ -8,6 +8,7 @@ |
#include "base/json/json_file_value_serializer.h" |
#include "base/logging.h" |
+#include "base/strings/string_util.h" |
#include "base/values.h" |
namespace extensions { |
@@ -24,8 +25,8 @@ bool NativeMessagingHostManifest::IsValidName(const std::string& name) { |
char c = name[i]; |
// Verify that only the following characters are used: [a-z0-9._]. |
- if (!((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || |
- c == '.' || c == '_')) { |
+ if (!(base::IsAsciiLower(c) || base::IsAsciiDigit(c) || c == '.' || |
+ c == '_')) { |
return false; |
} |