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

Side by Side Diff: components/policy/core/common/registry_dict_win.cc

Issue 1224553010: Replace base::str[n]casecmp with helper functions. (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 unified diff | Download patch
« no previous file with comments | « components/mime_util/mime_util.cc ('k') | content/common/service_worker/service_worker_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/policy/core/common/registry_dict_win.h" 5 #include "components/policy/core/common/registry_dict_win.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 LOG(WARNING) << "Failed to convert " << value.GetType() 130 LOG(WARNING) << "Failed to convert " << value.GetType()
131 << " to " << schema.type(); 131 << " to " << schema.type();
132 return nullptr; 132 return nullptr;
133 } 133 }
134 134
135 } // namespace 135 } // namespace
136 136
137 bool CaseInsensitiveStringCompare::operator()(const std::string& a, 137 bool CaseInsensitiveStringCompare::operator()(const std::string& a,
138 const std::string& b) const { 138 const std::string& b) const {
139 return base::strcasecmp(a.c_str(), b.c_str()) < 0; 139 return base::CompareCaseInsensitiveASCII(a, b) < 0;
140 } 140 }
141 141
142 RegistryDict::RegistryDict() {} 142 RegistryDict::RegistryDict() {}
143 143
144 RegistryDict::~RegistryDict() { 144 RegistryDict::~RegistryDict() {
145 ClearKeys(); 145 ClearKeys();
146 ClearValues(); 146 ClearValues();
147 } 147 }
148 148
149 RegistryDict* RegistryDict::GetKey(const std::string& name) { 149 RegistryDict* RegistryDict::GetKey(const std::string& name) {
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 return result.Pass(); 341 return result.Pass();
342 } 342 }
343 default: 343 default:
344 LOG(WARNING) << "Can't convert registry key to schema type " << type; 344 LOG(WARNING) << "Can't convert registry key to schema type " << type;
345 } 345 }
346 346
347 return nullptr; 347 return nullptr;
348 } 348 }
349 349
350 } // namespace policy 350 } // namespace policy
OLDNEW
« no previous file with comments | « components/mime_util/mime_util.cc ('k') | content/common/service_worker/service_worker_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698