diff options
author | stevenjb@google.com <stevenjb@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-20 23:18:27 +0000 |
---|---|---|
committer | stevenjb@google.com <stevenjb@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-20 23:18:27 +0000 |
commit | e39c71e424779b812ca783c2e1f99cc67c8c702f (patch) | |
tree | 25f8ce92505ec5fe81ef04126f02633bbb4cff37 /chromeos/network | |
parent | e7a6718aaf18735e65d15c2b455d755a5efdbe1e (diff) | |
download | chromium_src-e39c71e424779b812ca783c2e1f99cc67c8c702f.zip chromium_src-e39c71e424779b812ca783c2e1f99cc67c8c702f.tar.gz chromium_src-e39c71e424779b812ca783c2e1f99cc67c8c702f.tar.bz2 |
Re-factor TraySms to use ash::SmsObserver instead of NetoworkSmsHandler.
It turns out that the new SmsWatcher class does not work correctly if devices are added after it is initialized. This could be a problem with newly activated networks.
For now, revert to using the existing, tested SmsObserver class in Chrome through the existing ash::SystemTrayDelegate.
BUG=133569
TEST=See issue for testing details
Review URL: https://chromiumcodereview.appspot.com/10582028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143291 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/network')
-rw-r--r-- | chromeos/network/network_sms_handler.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chromeos/network/network_sms_handler.cc b/chromeos/network/network_sms_handler.cc index 72d188a..96f9950 100644 --- a/chromeos/network/network_sms_handler.cc +++ b/chromeos/network/network_sms_handler.cc @@ -334,6 +334,10 @@ NetworkSmsHandler::~NetworkSmsHandler() { } void NetworkSmsHandler::Init() { + // TODO(stevenjb): This code needs to monitor changes to Manager.Network + // so that devices added after Init() is called get added to device_handlers_. + // See: crbug.com/133416. + // Request network manager properties so that we can get the list of devices. DBusThreadManager::Get()->GetFlimflamManagerClient()->GetProperties( base::Bind(&NetworkSmsHandler::ManagerPropertiesCallback, @@ -381,6 +385,7 @@ void NetworkSmsHandler::ManagerPropertiesCallback( (*iter)->GetAsString(&device_path); if (!device_path.empty()) { // Request device properties. + VLOG(1) << "GetDeviceProperties: " << device_path; DBusThreadManager::Get()->GetFlimflamDeviceClient()->GetProperties( dbus::ObjectPath(device_path), base::Bind(&NetworkSmsHandler::DevicePropertiesCallback, @@ -394,8 +399,10 @@ void NetworkSmsHandler::DevicePropertiesCallback( const std::string& device_path, DBusMethodCallStatus call_status, const base::DictionaryValue& properties) { - if (call_status != DBUS_METHOD_CALL_SUCCESS) + if (call_status != DBUS_METHOD_CALL_SUCCESS) { + LOG(ERROR) << "NetworkSmsHandler: ERROR: " << call_status; return; + } std::string device_type; if (!properties.GetStringWithoutPathExpansion( |