Commit 35fdb442 authored by Abhishek Bhardwaj's avatar Abhishek Bhardwaj Committed by Commit Bot

Clang format network related files

This change clang formats a subset of network related source files.

BUG=891143
TEST=Compile.

Change-Id: I131d132dbcd36200310a8c785eab067795e20576
Reviewed-on: https://chromium-review.googlesource.com/c/1252334
Commit-Queue: Abhishek Bhardwaj <abhishekbh@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595904}
parent 88a928b2
......@@ -39,8 +39,8 @@ const char kFailedMessage[] = "Failed";
void ErrorFunction(const std::string& device_path,
const std::string& error_name,
const std::string& error_message) {
LOG(ERROR) << "Shill Error for: " << device_path
<< ": " << error_name << " : " << error_message;
LOG(ERROR) << "Shill Error for: " << device_path << ": " << error_name
<< " : " << error_message;
}
void PostError(const std::string& error,
......@@ -391,8 +391,10 @@ ShillDeviceClient::TestInterface* FakeShillDeviceClient::GetTestInterface() {
void FakeShillDeviceClient::AddDevice(const std::string& device_path,
const std::string& type,
const std::string& name) {
DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()->
AddDevice(device_path);
DBusThreadManager::Get()
->GetShillManagerClient()
->GetTestInterface()
->AddDevice(device_path);
base::Value* properties = GetDeviceProperties(device_path);
properties->SetKey(shill::kTypeProperty, base::Value(type));
......@@ -407,15 +409,19 @@ void FakeShillDeviceClient::AddDevice(const std::string& device_path,
}
void FakeShillDeviceClient::RemoveDevice(const std::string& device_path) {
DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()->
RemoveDevice(device_path);
DBusThreadManager::Get()
->GetShillManagerClient()
->GetTestInterface()
->RemoveDevice(device_path);
stub_devices_.RemoveWithoutPathExpansion(device_path, NULL);
}
void FakeShillDeviceClient::ClearDevices() {
DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()->
ClearDevices();
DBusThreadManager::Get()
->GetShillManagerClient()
->GetTestInterface()
->ClearDevices();
stub_devices_.Clear();
}
......@@ -424,8 +430,8 @@ void FakeShillDeviceClient::SetDeviceProperty(const std::string& device_path,
const std::string& name,
const base::Value& value,
bool notify_changed) {
VLOG(1) << "SetDeviceProperty: " << device_path
<< ": " << name << " = " << value;
VLOG(1) << "SetDeviceProperty: " << device_path << ": " << name << " = "
<< value;
SetPropertyInternal(dbus::ObjectPath(device_path), name, value,
base::DoNothing(),
base::Bind(&ErrorFunction, device_path), notify_changed);
......@@ -433,14 +439,14 @@ void FakeShillDeviceClient::SetDeviceProperty(const std::string& device_path,
std::string FakeShillDeviceClient::GetDevicePathForType(
const std::string& type) {
for (base::DictionaryValue::Iterator iter(stub_devices_);
!iter.IsAtEnd(); iter.Advance()) {
for (base::DictionaryValue::Iterator iter(stub_devices_); !iter.IsAtEnd();
iter.Advance()) {
const base::DictionaryValue* properties = NULL;
if (!iter.value().GetAsDictionary(&properties))
continue;
std::string prop_type;
if (!properties->GetStringWithoutPathExpansion(
shill::kTypeProperty, &prop_type) ||
if (!properties->GetStringWithoutPathExpansion(shill::kTypeProperty,
&prop_type) ||
prop_type != type)
continue;
return iter.key();
......@@ -611,8 +617,8 @@ void FakeShillDeviceClient::PassStubDeviceProperties(
const dbus::ObjectPath& device_path,
const DictionaryValueCallback& callback) const {
const base::DictionaryValue* device_properties = NULL;
if (!stub_devices_.GetDictionaryWithoutPathExpansion(
device_path.value(), &device_properties)) {
if (!stub_devices_.GetDictionaryWithoutPathExpansion(device_path.value(),
&device_properties)) {
base::DictionaryValue empty_dictionary;
callback.Run(DBUS_METHOD_CALL_FAILURE, empty_dictionary);
return;
......@@ -638,8 +644,7 @@ void FakeShillDeviceClient::NotifyObserversPropertyChanged(
}
base::Value* value = NULL;
if (!dict->GetWithoutPathExpansion(property, &value)) {
LOG(ERROR) << "Notify for unknown property: "
<< path << " : " << property;
LOG(ERROR) << "Notify for unknown property: " << path << " : " << property;
return;
}
for (auto& observer : GetObserverList(device_path))
......
......@@ -78,11 +78,10 @@ class CHROMEOS_EXPORT FakeShillDeviceClient
const std::string& peer,
const StringCallback& callback,
const ErrorCallback& error_callback) override;
void AddWakeOnPacketConnection(
const dbus::ObjectPath& device_path,
const net::IPEndPoint& ip_endpoint,
const base::Closure& callback,
const ErrorCallback& error_callback) override;
void AddWakeOnPacketConnection(const dbus::ObjectPath& device_path,
const net::IPEndPoint& ip_endpoint,
const base::Closure& callback,
const ErrorCallback& error_callback) override;
void RemoveWakeOnPacketConnection(
const dbus::ObjectPath& device_path,
const net::IPEndPoint& ip_endpoint,
......@@ -165,7 +164,7 @@ class CHROMEOS_EXPORT FakeShillDeviceClient
std::string tdls_state_;
// Wake on packet connections for each device.
std::map<dbus::ObjectPath, std::set<net::IPEndPoint> >
std::map<dbus::ObjectPath, std::set<net::IPEndPoint>>
wake_on_packet_connections_;
// Current SIM PIN per device path.
......
......@@ -27,13 +27,11 @@ namespace {
// The ShillDeviceClient implementation.
class ShillDeviceClientImpl : public ShillDeviceClient {
public:
ShillDeviceClientImpl()
: bus_(NULL) {
}
ShillDeviceClientImpl() : bus_(NULL) {}
~ShillDeviceClientImpl() override {
for (HelperMap::iterator iter = helpers_.begin();
iter != helpers_.end(); ++iter) {
for (HelperMap::iterator iter = helpers_.begin(); iter != helpers_.end();
++iter) {
// This *should* never happen, yet we're getting crash reports that
// seem to imply that it does happen sometimes. Adding CHECKs here
// so we can determine more accurately where the problem lies.
......@@ -75,9 +73,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
dbus::MessageWriter writer(&method_call);
writer.AppendString(name);
ShillClientHelper::AppendValueDataAsVariant(&writer, value);
GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call,
callback,
error_callback);
GetHelper(device_path)
->CallVoidMethodWithErrorCallback(&method_call, callback,
error_callback);
}
void ClearProperty(const dbus::ObjectPath& device_path,
......@@ -100,8 +98,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
dbus::MessageWriter writer(&method_call);
writer.AppendString(pin);
writer.AppendBool(require);
GetHelper(device_path)->CallVoidMethodWithErrorCallback(
&method_call, callback, error_callback);
GetHelper(device_path)
->CallVoidMethodWithErrorCallback(&method_call, callback,
error_callback);
}
void EnterPin(const dbus::ObjectPath& device_path,
......@@ -112,8 +111,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
shill::kEnterPinFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(pin);
GetHelper(device_path)->CallVoidMethodWithErrorCallback(
&method_call, callback, error_callback);
GetHelper(device_path)
->CallVoidMethodWithErrorCallback(&method_call, callback,
error_callback);
}
void UnblockPin(const dbus::ObjectPath& device_path,
......@@ -126,8 +126,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
dbus::MessageWriter writer(&method_call);
writer.AppendString(puk);
writer.AppendString(pin);
GetHelper(device_path)->CallVoidMethodWithErrorCallback(
&method_call, callback, error_callback);
GetHelper(device_path)
->CallVoidMethodWithErrorCallback(&method_call, callback,
error_callback);
}
void ChangePin(const dbus::ObjectPath& device_path,
......@@ -140,8 +141,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
dbus::MessageWriter writer(&method_call);
writer.AppendString(old_pin);
writer.AppendString(new_pin);
GetHelper(device_path)->CallVoidMethodWithErrorCallback(
&method_call, callback, error_callback);
GetHelper(device_path)
->CallVoidMethodWithErrorCallback(&method_call, callback,
error_callback);
}
void Register(const dbus::ObjectPath& device_path,
......@@ -152,8 +154,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
shill::kRegisterFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(network_id);
GetHelper(device_path)->CallVoidMethodWithErrorCallback(
&method_call, callback, error_callback);
GetHelper(device_path)
->CallVoidMethodWithErrorCallback(&method_call, callback,
error_callback);
}
void SetCarrier(const dbus::ObjectPath& device_path,
......@@ -164,8 +167,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
shill::kSetCarrierFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(carrier);
GetHelper(device_path)->CallVoidMethodWithErrorCallback(
&method_call, callback, error_callback);
GetHelper(device_path)
->CallVoidMethodWithErrorCallback(&method_call, callback,
error_callback);
}
void Reset(const dbus::ObjectPath& device_path,
......@@ -173,8 +177,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
const ErrorCallback& error_callback) override {
dbus::MethodCall method_call(shill::kFlimflamDeviceInterface,
shill::kResetFunction);
GetHelper(device_path)->CallVoidMethodWithErrorCallback(
&method_call, callback, error_callback);
GetHelper(device_path)
->CallVoidMethodWithErrorCallback(&method_call, callback,
error_callback);
}
void PerformTDLSOperation(const dbus::ObjectPath& device_path,
......@@ -187,15 +192,15 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
dbus::MessageWriter writer(&method_call);
writer.AppendString(operation);
writer.AppendString(peer);
GetHelper(device_path)->CallStringMethodWithErrorCallback(
&method_call, callback, error_callback);
GetHelper(device_path)
->CallStringMethodWithErrorCallback(&method_call, callback,
error_callback);
}
void AddWakeOnPacketConnection(
const dbus::ObjectPath& device_path,
const net::IPEndPoint& ip_endpoint,
const base::Closure& callback,
const ErrorCallback& error_callback) override {
void AddWakeOnPacketConnection(const dbus::ObjectPath& device_path,
const net::IPEndPoint& ip_endpoint,
const base::Closure& callback,
const ErrorCallback& error_callback) override {
if (ip_endpoint.address().empty()) {
LOG(ERROR) << "AddWakeOnPacketConnection: null address";
return;
......@@ -204,9 +209,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
shill::kAddWakeOnPacketConnectionFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(ip_endpoint.ToStringWithoutPort());
GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call,
callback,
error_callback);
GetHelper(device_path)
->CallVoidMethodWithErrorCallback(&method_call, callback,
error_callback);
}
void RemoveWakeOnPacketConnection(
......@@ -222,9 +227,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
shill::kRemoveWakeOnPacketConnectionFunction);
dbus::MessageWriter writer(&method_call);
writer.AppendString(ip_endpoint.ToStringWithoutPort());
GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call,
callback,
error_callback);
GetHelper(device_path)
->CallVoidMethodWithErrorCallback(&method_call, callback,
error_callback);
}
void RemoveAllWakeOnPacketConnections(
......@@ -234,9 +239,9 @@ class ShillDeviceClientImpl : public ShillDeviceClient {
dbus::MethodCall method_call(
shill::kFlimflamDeviceInterface,
shill::kRemoveAllWakeOnPacketConnectionsFunction);
GetHelper(device_path)->CallVoidMethodWithErrorCallback(&method_call,
callback,
error_callback);
GetHelper(device_path)
->CallVoidMethodWithErrorCallback(&method_call, callback,
error_callback);
}
TestInterface* GetTestInterface() override { return NULL; }
......
......@@ -61,11 +61,8 @@ void HandleShillCallFailure(
const std::string& shill_error_name,
const std::string& shill_error_message) {
network_handler::ShillErrorCallbackFunction(
GetErrorNameForShillError(shill_error_name),
device_path,
error_callback,
shill_error_name,
shill_error_message);
GetErrorNameForShillError(shill_error_name), device_path, error_callback,
shill_error_name, shill_error_message);
}
void IPConfigRefreshCallback(const std::string& ipconfig_path, bool result) {
......@@ -82,12 +79,10 @@ void RefreshIPConfigsCallback(
const std::string& device_path,
const base::DictionaryValue& properties) {
const base::ListValue* ip_configs;
if (!properties.GetListWithoutPathExpansion(
shill::kIPConfigsProperty, &ip_configs)) {
if (!properties.GetListWithoutPathExpansion(shill::kIPConfigsProperty,
&ip_configs)) {
network_handler::ShillErrorCallbackFunction(
"RequestRefreshIPConfigs Failed",
device_path,
error_callback,
"RequestRefreshIPConfigs Failed", device_path, error_callback,
std::string("Missing ") + shill::kIPConfigsProperty, "");
return;
}
......@@ -116,10 +111,7 @@ void SetDevicePropertyInternal(
const network_handler::ErrorCallback& error_callback) {
NET_LOG(USER) << "Device.SetProperty: " << property_name << " = " << value;
DBusThreadManager::Get()->GetShillDeviceClient()->SetProperty(
dbus::ObjectPath(device_path),
property_name,
value,
callback,
dbus::ObjectPath(device_path), property_name, value, callback,
base::Bind(&HandleShillCallFailure, device_path, error_callback));
}
......@@ -139,12 +131,11 @@ void CallPerformTDLSOperation(
const network_handler::StringResultCallback& callback,
const network_handler::ErrorCallback& error_callback);
void TDLSSuccessCallback(
const std::string& device_path,
const TDLSOperationParams& params,
const network_handler::StringResultCallback& callback,
const network_handler::ErrorCallback& error_callback,
const std::string& result) {
void TDLSSuccessCallback(const std::string& device_path,
const TDLSOperationParams& params,
const network_handler::StringResultCallback& callback,
const network_handler::ErrorCallback& error_callback,
const std::string& result) {
std::string event_desc = "TDLSSuccessCallback: " + params.operation;
if (!result.empty())
event_desc += ": " + result;
......@@ -197,13 +188,12 @@ void TDLSSuccessCallback(
request_delay);
}
void TDLSErrorCallback(
const std::string& device_path,
const TDLSOperationParams& params,
const network_handler::StringResultCallback& callback,
const network_handler::ErrorCallback& error_callback,
const std::string& dbus_error_name,
const std::string& dbus_error_message) {
void TDLSErrorCallback(const std::string& device_path,
const TDLSOperationParams& params,
const network_handler::StringResultCallback& callback,
const network_handler::ErrorCallback& error_callback,
const std::string& dbus_error_name,
const std::string& dbus_error_message) {
// If a Setup operation receives an InProgress error, retry.
const int kMaxRetries = 5;
if ((params.operation == shill::kTDLSDiscoverOperation ||
......@@ -234,8 +224,9 @@ void TDLSErrorCallback(
return;
const std::string error_name =
dbus_error_name == shill::kErrorResultInProgress ?
NetworkDeviceHandler::kErrorTimeout : NetworkDeviceHandler::kErrorUnknown;
dbus_error_name == shill::kErrorResultInProgress
? NetworkDeviceHandler::kErrorTimeout
: NetworkDeviceHandler::kErrorUnknown;
const std::string& error_detail = params.ip_or_mac_address;
std::unique_ptr<base::DictionaryValue> error_data(
network_handler::CreateDBusErrorData(device_path, error_name,
......@@ -253,13 +244,11 @@ void CallPerformTDLSOperation(
NET_LOG(EVENT) << "CallPerformTDLSOperation: " << params.operation << ": "
<< device_path;
DBusThreadManager::Get()->GetShillDeviceClient()->PerformTDLSOperation(
dbus::ObjectPath(device_path),
params.operation,
params.ip_or_mac_address,
base::Bind(&TDLSSuccessCallback,
device_path, params, callback, error_callback),
base::Bind(&TDLSErrorCallback,
device_path, params, callback, error_callback));
dbus::ObjectPath(device_path), params.operation, params.ip_or_mac_address,
base::Bind(&TDLSSuccessCallback, device_path, params, callback,
error_callback),
base::Bind(&TDLSErrorCallback, device_path, params, callback,
error_callback));
}
} // namespace
......@@ -275,8 +264,8 @@ void NetworkDeviceHandlerImpl::GetDeviceProperties(
const network_handler::ErrorCallback& error_callback) const {
DBusThreadManager::Get()->GetShillDeviceClient()->GetProperties(
dbus::ObjectPath(device_path),
base::Bind(&network_handler::GetPropertiesCallback,
callback, error_callback, device_path));
base::Bind(&network_handler::GetPropertiesCallback, callback,
error_callback, device_path));
}
void NetworkDeviceHandlerImpl::SetDeviceProperty(
......@@ -287,31 +276,29 @@ void NetworkDeviceHandlerImpl::SetDeviceProperty(
const network_handler::ErrorCallback& error_callback) {
const char* const property_blacklist[] = {
// Must only be changed by policy/owner through.
shill::kCellularAllowRoamingProperty
};
shill::kCellularAllowRoamingProperty};
for (size_t i = 0; i < arraysize(property_blacklist); ++i) {
if (property_name == property_blacklist[i]) {
InvokeErrorCallback(
device_path,
error_callback,
device_path, error_callback,
"SetDeviceProperty called on blacklisted property " + property_name);
return;
}
}
SetDevicePropertyInternal(
device_path, property_name, value, callback, error_callback);
SetDevicePropertyInternal(device_path, property_name, value, callback,
error_callback);
}
void NetworkDeviceHandlerImpl::RequestRefreshIPConfigs(
const std::string& device_path,
const base::Closure& callback,
const network_handler::ErrorCallback& error_callback) {
GetDeviceProperties(device_path,
base::Bind(&RefreshIPConfigsCallback,
callback, error_callback),
error_callback);
GetDeviceProperties(
device_path,
base::Bind(&RefreshIPConfigsCallback, callback, error_callback),
error_callback);
}
void NetworkDeviceHandlerImpl::RegisterCellularNetwork(
......@@ -322,9 +309,7 @@ void NetworkDeviceHandlerImpl::RegisterCellularNetwork(
NET_LOG(USER) << "Device.RegisterCellularNetwork: " << device_path
<< " Id: " << network_id;
DBusThreadManager::Get()->GetShillDeviceClient()->Register(
dbus::ObjectPath(device_path),
network_id,
callback,
dbus::ObjectPath(device_path), network_id, callback,
base::Bind(&HandleShillCallFailure, device_path, error_callback));
}
......@@ -336,9 +321,7 @@ void NetworkDeviceHandlerImpl::SetCarrier(
NET_LOG(USER) << "Device.SetCarrier: " << device_path
<< " carrier: " << carrier;
DBusThreadManager::Get()->GetShillDeviceClient()->SetCarrier(
dbus::ObjectPath(device_path),
carrier,
callback,
dbus::ObjectPath(device_path), carrier, callback,
base::Bind(&HandleShillCallFailure, device_path, error_callback));
}
......@@ -350,10 +333,7 @@ void NetworkDeviceHandlerImpl::RequirePin(
const network_handler::ErrorCallback& error_callback) {
NET_LOG(USER) << "Device.RequirePin: " << device_path << ": " << require_pin;
DBusThreadManager::Get()->GetShillDeviceClient()->RequirePin(
dbus::ObjectPath(device_path),
pin,
require_pin,
callback,
dbus::ObjectPath(device_path), pin, require_pin, callback,
base::Bind(&HandleShillCallFailure, device_path, error_callback));
}
......@@ -364,9 +344,7 @@ void NetworkDeviceHandlerImpl::EnterPin(
const network_handler::ErrorCallback& error_callback) {
NET_LOG(USER) << "Device.EnterPin: " << device_path;
DBusThreadManager::Get()->GetShillDeviceClient()->EnterPin(
dbus::ObjectPath(device_path),
pin,
callback,
dbus::ObjectPath(device_path), pin, callback,
base::Bind(&HandleShillCallFailure, device_path, error_callback));
}
......@@ -378,10 +356,7 @@ void NetworkDeviceHandlerImpl::UnblockPin(
const network_handler::ErrorCallback& error_callback) {
NET_LOG(USER) << "Device.UnblockPin: " << device_path;
DBusThreadManager::Get()->GetShillDeviceClient()->UnblockPin(
dbus::ObjectPath(device_path),
puk,
new_pin,
callback,
dbus::ObjectPath(device_path), puk, new_pin, callback,
base::Bind(&HandleShillCallFailure, device_path, error_callback));
}
......@@ -393,10 +368,7 @@ void NetworkDeviceHandlerImpl::ChangePin(
const network_handler::ErrorCallback& error_callback) {
NET_LOG(USER) << "Device.ChangePin: " << device_path;
DBusThreadManager::Get()->GetShillDeviceClient()->ChangePin(
dbus::ObjectPath(device_path),
old_pin,
new_pin,
callback,
dbus::ObjectPath(device_path), old_pin, new_pin, callback,
base::Bind(&HandleShillCallFailure, device_path, error_callback));
}
......@@ -425,8 +397,8 @@ void NetworkDeviceHandlerImpl::SetWifiTDLSEnabled(
params.operation =
enabled ? shill::kTDLSDiscoverOperation : shill::kTDLSTeardownOperation;
params.ip_or_mac_address = ip_or_mac_address;
CallPerformTDLSOperation(
device_state->path(), params, callback, error_callback);
CallPerformTDLSOperation(device_state->path(), params, callback,
error_callback);
}
void NetworkDeviceHandlerImpl::GetWifiTDLSStatus(
......@@ -440,32 +412,29 @@ void NetworkDeviceHandlerImpl::GetWifiTDLSStatus(
TDLSOperationParams params;
params.operation = shill::kTDLSStatusOperation;
params.ip_or_mac_address = ip_or_mac_address;
CallPerformTDLSOperation(
device_state->path(), params, callback, error_callback);
CallPerformTDLSOperation(device_state->path(), params, callback,
error_callback);
}
void NetworkDeviceHandlerImpl::AddWifiWakeOnPacketConnection(
const net::IPEndPoint& ip_endpoint,
const base::Closure& callback,
const network_handler::ErrorCallback& error_callback) {
const net::IPEndPoint& ip_endpoint,
const base::Closure& callback,
const network_handler::ErrorCallback& error_callback) {
const DeviceState* device_state = GetWifiDeviceState(error_callback);
if (!device_state)
return;
NET_LOG(USER) << "Device.AddWakeOnWifi: " << device_state->path();
DBusThreadManager::Get()->GetShillDeviceClient()->AddWakeOnPacketConnection(
dbus::ObjectPath(device_state->path()),
ip_endpoint,
callback,
base::Bind(&HandleShillCallFailure,
device_state->path(),
dbus::ObjectPath(device_state->path()), ip_endpoint, callback,
base::Bind(&HandleShillCallFailure, device_state->path(),
error_callback));
}
void NetworkDeviceHandlerImpl::RemoveWifiWakeOnPacketConnection(
const net::IPEndPoint& ip_endpoint,
const base::Closure& callback,
const network_handler::ErrorCallback& error_callback) {
const net::IPEndPoint& ip_endpoint,
const base::Closure& callback,
const network_handler::ErrorCallback& error_callback) {
const DeviceState* device_state = GetWifiDeviceState(error_callback);
if (!device_state)
return;
......@@ -473,17 +442,15 @@ void NetworkDeviceHandlerImpl::RemoveWifiWakeOnPacketConnection(
NET_LOG(USER) << "Device.RemoveWakeOnWifi: " << device_state->path();
DBusThreadManager::Get()
->GetShillDeviceClient()
->RemoveWakeOnPacketConnection(dbus::ObjectPath(device_state->path()),
ip_endpoint,
callback,
base::Bind(&HandleShillCallFailure,
device_state->path(),
error_callback));
->RemoveWakeOnPacketConnection(
dbus::ObjectPath(device_state->path()), ip_endpoint, callback,
base::Bind(&HandleShillCallFailure, device_state->path(),
error_callback));
}
void NetworkDeviceHandlerImpl::RemoveAllWifiWakeOnPacketConnections(
const base::Closure& callback,
const network_handler::ErrorCallback& error_callback) {
const base::Closure& callback,
const network_handler::ErrorCallback& error_callback) {
const DeviceState* device_state = GetWifiDeviceState(error_callback);
if (!device_state)
return;
......@@ -491,11 +458,10 @@ void NetworkDeviceHandlerImpl::RemoveAllWifiWakeOnPacketConnections(
NET_LOG(USER) << "Device.RemoveAllWakeOnWifi: " << device_state->path();
DBusThreadManager::Get()
->GetShillDeviceClient()
->RemoveAllWakeOnPacketConnections(dbus::ObjectPath(device_state->path()),
callback,
base::Bind(&HandleShillCallFailure,
device_state->path(),
error_callback));
->RemoveAllWakeOnPacketConnections(
dbus::ObjectPath(device_state->path()), callback,
base::Bind(&HandleShillCallFailure, device_state->path(),
error_callback));
}
void NetworkDeviceHandlerImpl::DeviceListChanged() {
......@@ -523,7 +489,7 @@ void NetworkDeviceHandlerImpl::ApplyCellularAllowRoamingToShill() {
return;
}
for (NetworkStateHandler::DeviceStateList::const_iterator it = list.begin();
it != list.end(); ++it) {
it != list.end(); ++it) {
const DeviceState* device_state = *it;
bool current_allow_roaming = device_state->allow_roaming();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment