| 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 "chrome/browser/chromeos/cros/sms_watcher.h" | 5 #include "chrome/browser/chromeos/cros/sms_watcher.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "chromeos/dbus/dbus_thread_manager.h" | 14 #include "chromeos/dbus/dbus_thread_manager.h" |
| 15 #include "chromeos/dbus/flimflam_device_client.h" | 15 #include "chromeos/dbus/shill_device_client.h" |
| 16 #include "chromeos/dbus/gsm_sms_client.h" | 16 #include "chromeos/dbus/gsm_sms_client.h" |
| 17 #include "chromeos/dbus/modem_messaging_client.h" | 17 #include "chromeos/dbus/modem_messaging_client.h" |
| 18 #include "chromeos/dbus/sms_client.h" | 18 #include "chromeos/dbus/sms_client.h" |
| 19 #include "third_party/cros_system_api/dbus/service_constants.h" | 19 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 20 | 20 |
| 21 namespace chromeos { | 21 namespace chromeos { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 int decode_bcd(const char *s) { | 25 int decode_bcd(const char *s) { |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 DISALLOW_COPY_AND_ASSIGN(ModemManager1Watcher); | 357 DISALLOW_COPY_AND_ASSIGN(ModemManager1Watcher); |
| 358 }; | 358 }; |
| 359 | 359 |
| 360 } // namespace | 360 } // namespace |
| 361 | 361 |
| 362 SMSWatcher::SMSWatcher(const std::string& modem_device_path, | 362 SMSWatcher::SMSWatcher(const std::string& modem_device_path, |
| 363 MonitorSMSCallback callback) | 363 MonitorSMSCallback callback) |
| 364 : weak_ptr_factory_(this), | 364 : weak_ptr_factory_(this), |
| 365 device_path_(modem_device_path), | 365 device_path_(modem_device_path), |
| 366 callback_(callback) { | 366 callback_(callback) { |
| 367 DBusThreadManager::Get()->GetFlimflamDeviceClient()->GetProperties( | 367 DBusThreadManager::Get()->GetShillDeviceClient()->GetProperties( |
| 368 dbus::ObjectPath(modem_device_path), | 368 dbus::ObjectPath(modem_device_path), |
| 369 base::Bind(&SMSWatcher::DevicePropertiesCallback, | 369 base::Bind(&SMSWatcher::DevicePropertiesCallback, |
| 370 weak_ptr_factory_.GetWeakPtr())); | 370 weak_ptr_factory_.GetWeakPtr())); |
| 371 } | 371 } |
| 372 | 372 |
| 373 SMSWatcher::~SMSWatcher() { | 373 SMSWatcher::~SMSWatcher() { |
| 374 } | 374 } |
| 375 | 375 |
| 376 void SMSWatcher::DevicePropertiesCallback( | 376 void SMSWatcher::DevicePropertiesCallback( |
| 377 DBusMethodCallStatus call_status, | 377 DBusMethodCallStatus call_status, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 400 new ModemManager1Watcher(device_path_, callback_, dbus_connection, | 400 new ModemManager1Watcher(device_path_, callback_, dbus_connection, |
| 401 dbus::ObjectPath(object_path_string))); | 401 dbus::ObjectPath(object_path_string))); |
| 402 } else { | 402 } else { |
| 403 watcher_.reset( | 403 watcher_.reset( |
| 404 new GsmWatcher(device_path_, callback_, dbus_connection, | 404 new GsmWatcher(device_path_, callback_, dbus_connection, |
| 405 dbus::ObjectPath(object_path_string))); | 405 dbus::ObjectPath(object_path_string))); |
| 406 } | 406 } |
| 407 } | 407 } |
| 408 | 408 |
| 409 } // namespace chromeos | 409 } // namespace chromeos |
| OLD | NEW |