OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |