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

Unified Diff: sandbox/win/src/win_utils.cc

Issue 2121513002: Replace string::find(prefix) == 0 pattern with base::StartsWith(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typos Created 4 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: sandbox/win/src/win_utils.cc
diff --git a/sandbox/win/src/win_utils.cc b/sandbox/win/src/win_utils.cc
index c31c25e3af5f4705b6009007485dfc406ff62221..8e4da5fc97afcc5cbd6887880e9495f3404780cb 100644
--- a/sandbox/win/src/win_utils.cc
+++ b/sandbox/win/src/win_utils.cc
@@ -132,7 +132,8 @@ HKEY GetReservedKeyFromName(const base::string16& name) {
bool ResolveRegistryName(base::string16 name, base::string16* resolved_name) {
for (size_t i = 0; i < arraysize(kKnownKey); ++i) {
- if (name.find(kKnownKey[i].name) == 0) {
+ if (base::StartsWith(name, kKnownKey[i].name,
+ base::CompareCase::SENSITIVE)) {
HKEY key;
DWORD disposition;
if (ERROR_SUCCESS != ::RegCreateKeyEx(kKnownKey[i].key, L"", 0, NULL, 0,
« media/blink/resource_multibuffer_data_provider.cc ('K') | « ppapi/shared_impl/test_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698