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

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

Issue 1279123004: Replace ToLower calls to the new format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/preg_parser_win.h" 5 #include "components/policy/core/common/preg_parser_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 std::string value_name(base::UTF16ToUTF8(value)); 180 std::string value_name(base::UTF16ToUTF8(value));
181 if (!base::StartsWith(value_name, kActionTriggerPrefix, 181 if (!base::StartsWith(value_name, kActionTriggerPrefix,
182 base::CompareCase::SENSITIVE)) { 182 base::CompareCase::SENSITIVE)) {
183 scoped_ptr<base::Value> value; 183 scoped_ptr<base::Value> value;
184 if (DecodePRegValue(type, data, &value)) 184 if (DecodePRegValue(type, data, &value))
185 dict->SetValue(value_name, value.Pass()); 185 dict->SetValue(value_name, value.Pass());
186 return; 186 return;
187 } 187 }
188 188
189 std::string action_trigger(base::StringToLowerASCII(value_name.substr( 189 std::string action_trigger(base::ToLowerASCII(value_name.substr(
190 arraysize(kActionTriggerPrefix) - 1))); 190 arraysize(kActionTriggerPrefix) - 1)));
191 if (action_trigger == kActionTriggerDeleteValues) { 191 if (action_trigger == kActionTriggerDeleteValues) {
192 for (const std::string& value : 192 for (const std::string& value :
193 base::SplitString(DecodePRegStringValue(data), ";", 193 base::SplitString(DecodePRegStringValue(data), ";",
194 base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY)) 194 base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY))
195 dict->RemoveValue(value); 195 dict->RemoveValue(value);
196 } else if (base::StartsWith(action_trigger, kActionTriggerDeleteKeys, 196 } else if (base::StartsWith(action_trigger, kActionTriggerDeleteKeys,
197 base::CompareCase::SENSITIVE)) { 197 base::CompareCase::SENSITIVE)) {
198 for (const std::string& key : 198 for (const std::string& key :
199 base::SplitString(DecodePRegStringValue(data), ";", 199 base::SplitString(DecodePRegStringValue(data), ";",
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 } 306 }
307 307
308 LOG(ERROR) << "Error parsing " << file_path.value() << " at offset " 308 LOG(ERROR) << "Error parsing " << file_path.value() << " at offset "
309 << reinterpret_cast<const uint8*>(cursor - 1) - mapped_file.data(); 309 << reinterpret_cast<const uint8*>(cursor - 1) - mapped_file.data();
310 status->Add(POLICY_LOAD_STATUS_PARSE_ERROR); 310 status->Add(POLICY_LOAD_STATUS_PARSE_ERROR);
311 return false; 311 return false;
312 } 312 }
313 313
314 } // namespace preg_parser 314 } // namespace preg_parser
315 } // namespace policy 315 } // namespace policy
OLDNEW
« no previous file with comments | « components/plugins/renderer/mobile_youtube_plugin.cc ('k') | components/query_parser/snippet_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698