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

Unified Diff: components/policy/core/common/preg_parser_win.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 years, 6 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: components/policy/core/common/preg_parser_win.cc
diff --git a/components/policy/core/common/preg_parser_win.cc b/components/policy/core/common/preg_parser_win.cc
index 968134748c57e0ab678f055e7e4a45ab5240330c..4c13068e132f84f2211544bc54812e5154f066da 100644
--- a/components/policy/core/common/preg_parser_win.cc
+++ b/components/policy/core/common/preg_parser_win.cc
@@ -176,7 +176,7 @@ void HandleRecord(const base::string16& key_name,
return;
std::string value_name(base::UTF16ToUTF8(value));
- if (!StartsWithASCII(value_name, kActionTriggerPrefix, true)) {
+ if (!base::StartsWithASCII(value_name, kActionTriggerPrefix, true)) {
scoped_ptr<base::Value> value;
if (DecodePRegValue(type, data, &value))
dict->SetValue(value_name, value.Pass());
@@ -192,22 +192,25 @@ void HandleRecord(const base::string16& key_name,
value != values.end(); ++value) {
dict->RemoveValue(*value);
}
- } else if (StartsWithASCII(action_trigger, kActionTriggerDeleteKeys, true)) {
+ } else if (base::StartsWithASCII(action_trigger, kActionTriggerDeleteKeys,
+ true)) {
std::vector<std::string> keys;
Tokenize(DecodePRegStringValue(data), ";", &keys);
for (std::vector<std::string>::const_iterator key(keys.begin());
key != keys.end(); ++key) {
dict->RemoveKey(*key);
}
- } else if (StartsWithASCII(action_trigger, kActionTriggerDel, true)) {
+ } else if (base::StartsWithASCII(action_trigger, kActionTriggerDel, true)) {
dict->RemoveValue(
value_name.substr(arraysize(kActionTriggerPrefix) - 1 +
arraysize(kActionTriggerDel) - 1));
- } else if (StartsWithASCII(action_trigger, kActionTriggerDelVals, true)) {
+ } else if (base::StartsWithASCII(action_trigger, kActionTriggerDelVals,
+ true)) {
// Delete all values.
dict->ClearValues();
- } else if (StartsWithASCII(action_trigger, kActionTriggerSecureKey, true) ||
- StartsWithASCII(action_trigger, kActionTriggerSoft, true)) {
+ } else if (base::StartsWithASCII(action_trigger, kActionTriggerSecureKey,
+ true) ||
+ base::StartsWithASCII(action_trigger, kActionTriggerSoft, true)) {
// Doesn't affect values.
} else {
LOG(ERROR) << "Bad action trigger " << value_name;
@@ -295,7 +298,7 @@ bool ReadFile(const base::FilePath& file_path,
break;
// Process the record if it is within the |root| subtree.
- if (StartsWith(key_name, root, false))
+ if (base::StartsWith(key_name, root, false))
HandleRecord(key_name.substr(root.size()), value, type, data, dict);
}

Powered by Google App Engine
This is Rietveld 408576698