shill: vpn: Deprecate flimflam namespace.
CL:170123 moves all DBus service constants from the flimflam namespace
to the shill namespace. This CL removes the use of the flimflam
namespace in VPN code.
BUG=chromium:295425
CQ-DEPEND=CL:170123
TEST=Unit tests and trybot runs on release builders.
Change-Id: I8359f5b5ca456138b8cc596c14a11e8e37e7f5fe
Reviewed-on: https://chromium-review.googlesource.com/170207
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
diff --git a/vpn_provider.cc b/vpn_provider.cc
index 959bc0e..947fc53 100644
--- a/vpn_provider.cc
+++ b/vpn_provider.cc
@@ -46,14 +46,14 @@
string *host_ptr,
Error *error) {
SLOG(VPN, 2) << __func__;
- string type = args.LookupString(flimflam::kProviderTypeProperty, "");
+ string type = args.LookupString(kProviderTypeProperty, "");
if (type.empty()) {
Error::PopulateAndLog(
error, Error::kNotSupported, "Missing VPN type property.");
return false;
}
- string host = args.LookupString(flimflam::kProviderHostProperty, "");
+ string host = args.LookupString(kProviderHostProperty, "");
if (host.empty()) {
Error::PopulateAndLog(
error, Error::kNotSupported, "Missing VPN host property.");
@@ -62,7 +62,7 @@
*type_ptr = type,
*host_ptr = host,
- *name_ptr = args.LookupString(flimflam::kNameProperty, "");
+ *name_ptr = args.LookupString(kNameProperty, "");
return true;
}
@@ -136,30 +136,30 @@
SLOG(VPN, 2) << __func__;
const StoreInterface *storage = profile->GetConstStorage();
set<string> groups =
- storage->GetGroupsWithKey(flimflam::kProviderTypeProperty);
+ storage->GetGroupsWithKey(kProviderTypeProperty);
for (set<string>::iterator it = groups.begin(); it != groups.end(); ++it) {
if (!StartsWithASCII(*it, "vpn_", false)) {
continue;
}
string type;
- if (!storage->GetString(*it, flimflam::kProviderTypeProperty, &type)) {
+ if (!storage->GetString(*it, kProviderTypeProperty, &type)) {
LOG(ERROR) << "Group " << *it << " is missing the "
- << flimflam::kProviderTypeProperty << " property.";
+ << kProviderTypeProperty << " property.";
continue;
}
string name;
- if (!storage->GetString(*it, flimflam::kNameProperty, &name)) {
+ if (!storage->GetString(*it, kNameProperty, &name)) {
LOG(ERROR) << "Group " << *it << " is missing the "
- << flimflam::kNameProperty << " property.";
+ << kNameProperty << " property.";
continue;
}
string host;
- if (!storage->GetString(*it, flimflam::kProviderHostProperty, &host)) {
+ if (!storage->GetString(*it, kProviderHostProperty, &host)) {
LOG(ERROR) << "Group " << *it << " is missing the "
- << flimflam::kProviderHostProperty << " property.";
+ << kProviderHostProperty << " property.";
continue;
}
@@ -200,11 +200,11 @@
#else
scoped_ptr<VPNDriver> driver;
- if (type == flimflam::kProviderOpenVpn) {
+ if (type == kProviderOpenVpn) {
driver.reset(new OpenVPNDriver(
control_interface_, dispatcher_, metrics_, manager_,
manager_->device_info(), manager_->glib()));
- } else if (type == flimflam::kProviderL2tpIpsec) {
+ } else if (type == kProviderL2tpIpsec) {
driver.reset(new L2TPIPSecDriver(
control_interface_, dispatcher_, metrics_, manager_,
manager_->device_info(), manager_->glib()));