| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chromeos/network/network_sms_handler.h" | 5 #include "chromeos/network/network_sms_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 | 403 |
| 404 void NetworkSmsHandler::ManagerPropertiesCallback( | 404 void NetworkSmsHandler::ManagerPropertiesCallback( |
| 405 DBusMethodCallStatus call_status, | 405 DBusMethodCallStatus call_status, |
| 406 const base::DictionaryValue& properties) { | 406 const base::DictionaryValue& properties) { |
| 407 if (call_status != DBUS_METHOD_CALL_SUCCESS) { | 407 if (call_status != DBUS_METHOD_CALL_SUCCESS) { |
| 408 LOG(ERROR) << "NetworkSmsHandler: Failed to get manager properties."; | 408 LOG(ERROR) << "NetworkSmsHandler: Failed to get manager properties."; |
| 409 return; | 409 return; |
| 410 } | 410 } |
| 411 const base::Value* value; | 411 const base::Value* value; |
| 412 if (!properties.GetWithoutPathExpansion(shill::kDevicesProperty, &value) || | 412 if (!properties.GetWithoutPathExpansion(shill::kDevicesProperty, &value) || |
| 413 value->GetType() != base::Value::TYPE_LIST) { | 413 value->GetType() != base::Value::Type::LIST) { |
| 414 LOG(ERROR) << "NetworkSmsHandler: No list value for: " | 414 LOG(ERROR) << "NetworkSmsHandler: No list value for: " |
| 415 << shill::kDevicesProperty; | 415 << shill::kDevicesProperty; |
| 416 return; | 416 return; |
| 417 } | 417 } |
| 418 const base::ListValue* devices = static_cast<const base::ListValue*>(value); | 418 const base::ListValue* devices = static_cast<const base::ListValue*>(value); |
| 419 UpdateDevices(devices); | 419 UpdateDevices(devices); |
| 420 } | 420 } |
| 421 | 421 |
| 422 void NetworkSmsHandler::UpdateDevices(const base::ListValue* devices) { | 422 void NetworkSmsHandler::UpdateDevices(const base::ListValue* devices) { |
| 423 for (base::ListValue::const_iterator iter = devices->begin(); | 423 for (base::ListValue::const_iterator iter = devices->begin(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 base::MakeUnique<ModemManager1NetworkSmsDeviceHandler>( | 474 base::MakeUnique<ModemManager1NetworkSmsDeviceHandler>( |
| 475 this, service_name, object_path)); | 475 this, service_name, object_path)); |
| 476 } else { | 476 } else { |
| 477 device_handlers_.push_back( | 477 device_handlers_.push_back( |
| 478 base::MakeUnique<ModemManagerNetworkSmsDeviceHandler>( | 478 base::MakeUnique<ModemManagerNetworkSmsDeviceHandler>( |
| 479 this, service_name, object_path)); | 479 this, service_name, object_path)); |
| 480 } | 480 } |
| 481 } | 481 } |
| 482 | 482 |
| 483 } // namespace chromeos | 483 } // namespace chromeos |
| OLD | NEW |