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

Unified Diff: chromeos/dbus/fake_shill_service_client.cc

Issue 1242023005: Remove legacy StartsWithASCII function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/dbus/fake_shill_service_client.cc
diff --git a/chromeos/dbus/fake_shill_service_client.cc b/chromeos/dbus/fake_shill_service_client.cc
index 990a37b559d99ba41421e83acb89c70235a44185..f0cf5ad2d46f3d134763c3beca58aef178c6dfb1 100644
--- a/chromeos/dbus/fake_shill_service_client.cc
+++ b/chromeos/dbus/fake_shill_service_client.cc
@@ -407,16 +407,16 @@ bool FakeShillServiceClient::SetServiceProperty(const std::string& service_path,
base::DictionaryValue new_properties;
std::string changed_property;
- bool case_sensitive = true;
- if (base::StartsWithASCII(property, "Provider.", case_sensitive) ||
- base::StartsWithASCII(property, "OpenVPN.", case_sensitive) ||
- base::StartsWithASCII(property, "L2TPIPsec.", case_sensitive)) {
+ base::CompareCase case_sensitive = base::CompareCase::SENSITIVE;
+ if (base::StartsWith(property, "Provider.", case_sensitive) ||
+ base::StartsWith(property, "OpenVPN.", case_sensitive) ||
+ base::StartsWith(property, "L2TPIPsec.", case_sensitive)) {
// These properties are only nested within the Provider dictionary if read
// from Shill. Properties that start with "Provider" need to have that
// stripped off, other properties are nested in the "Provider" dictionary
// as-is.
std::string key = property;
- if (base::StartsWithASCII(property, "Provider.", case_sensitive))
+ if (base::StartsWith(property, "Provider.", case_sensitive))
key = property.substr(strlen("Provider."));
base::DictionaryValue* provider = new base::DictionaryValue;
provider->SetWithoutPathExpansion(key, value.DeepCopy());
« no previous file with comments | « chromeos/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc ('k') | chromeos/dbus/session_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698