| Index: chromeos/network/shill_property_handler.cc
|
| diff --git a/chromeos/network/shill_property_handler.cc b/chromeos/network/shill_property_handler.cc
|
| index e6efd65920689a105bf81ded15f88d5fcdd28491..a73a76b5192f51202fcfcb9c3a8a8e42caebad1c 100644
|
| --- a/chromeos/network/shill_property_handler.cc
|
| +++ b/chromeos/network/shill_property_handler.cc
|
| @@ -22,8 +22,6 @@
|
|
|
| namespace {
|
|
|
| -const char kLogModule[] = "ShillPropertyHandler";
|
| -
|
| // Limit the number of services or devices we observe. Since they are listed in
|
| // priority order, it should be reasonable to ignore services past this.
|
| const size_t kMaxObserved = 100;
|
| @@ -160,7 +158,7 @@ void ShillPropertyHandler::SetTechnologyEnabled(
|
| technology,
|
| base::Bind(&base::DoNothing),
|
| base::Bind(&network_handler::ShillErrorCallbackFunction,
|
| - kLogModule, technology, error_callback));
|
| + technology, error_callback));
|
| }
|
| }
|
|
|
| @@ -169,15 +167,15 @@ void ShillPropertyHandler::RequestScan() const {
|
| "",
|
| base::Bind(&base::DoNothing),
|
| base::Bind(&network_handler::ShillErrorCallbackFunction,
|
| - kLogModule, "", network_handler::ErrorCallback()));
|
| + "", network_handler::ErrorCallback()));
|
| }
|
|
|
| void ShillPropertyHandler::ConnectToBestServices() const {
|
| - network_event_log::AddEntry(kLogModule, "ConnectToBestServices", "");
|
| + NET_LOG_EVENT("ConnectToBestServices", "");
|
| shill_manager_->ConnectToBestServices(
|
| base::Bind(&base::DoNothing),
|
| base::Bind(&network_handler::ShillErrorCallbackFunction,
|
| - kLogModule, "", network_handler::ErrorCallback()));
|
| + "", network_handler::ErrorCallback()));
|
| }
|
|
|
| void ShillPropertyHandler::RequestProperties(ManagedState::ManagedType type,
|
| @@ -203,8 +201,14 @@ void ShillPropertyHandler::RequestProperties(ManagedState::ManagedType type,
|
|
|
| void ShillPropertyHandler::OnPropertyChanged(const std::string& key,
|
| const base::Value& value) {
|
| - if (ManagerPropertyChanged(key, value))
|
| - listener_->ManagerPropertyChanged();
|
| + if (ManagerPropertyChanged(key, value)) {
|
| + std::string detail = key;
|
| + std::string vstr = network_event_log::DBusValueAsString(value);
|
| + if (!vstr.empty())
|
| + detail += " = " + vstr;
|
| + NET_LOG_DEBUG("ManagerPropertyChanged", detail);
|
| + listener_->NotifyManagerPropertyChanged();
|
| + }
|
| // If the service watch or device list changed and there are no pending
|
| // updates, signal the state list changed callback.
|
| if ((key == flimflam::kServiceWatchListProperty) &&
|
| @@ -224,9 +228,11 @@ void ShillPropertyHandler::ManagerPropertiesCallback(
|
| DBusMethodCallStatus call_status,
|
| const base::DictionaryValue& properties) {
|
| if (call_status != DBUS_METHOD_CALL_SUCCESS) {
|
| - LOG(ERROR) << "Failed to get Manager properties:" << call_status;
|
| + NET_LOG_ERROR("ManagerPropertiesCallback",
|
| + base::StringPrintf("Failed: %d", call_status));
|
| return;
|
| }
|
| + NET_LOG_EVENT("ManagerPropertiesCallback", "Success");
|
| bool notify = false;
|
| bool update_service_list = false;
|
| for (base::DictionaryValue::Iterator iter(properties);
|
| @@ -245,7 +251,7 @@ void ShillPropertyHandler::ManagerPropertiesCallback(
|
| notify |= ManagerPropertyChanged(flimflam::kServicesProperty, *value);
|
| }
|
| if (notify)
|
| - listener_->ManagerPropertyChanged();
|
| + listener_->NotifyManagerPropertyChanged();
|
| // If there are no pending updates, signal the state list changed callbacks.
|
| if (pending_updates_[ManagedState::MANAGED_TYPE_NETWORK].size() == 0)
|
| listener_->ManagedStateListChanged(ManagedState::MANAGED_TYPE_NETWORK);
|
| @@ -317,7 +323,7 @@ void ShillPropertyHandler::UpdateObserved(ManagedState::ManagedType type,
|
| new_observed[path] = new ShillPropertyObserver(
|
| type, path, base::Bind(
|
| &ShillPropertyHandler::PropertyChangedCallback, AsWeakPtr()));
|
| - network_event_log::AddEntry(kLogModule, "StartObserving", path);
|
| + NET_LOG_DEBUG("StartObserving", path);
|
| }
|
| observer_map.erase(path);
|
| // Limit the number of observed services.
|
| @@ -327,7 +333,7 @@ void ShillPropertyHandler::UpdateObserved(ManagedState::ManagedType type,
|
| // Delete network service observers still in observer_map.
|
| for (ShillPropertyObserverMap::iterator iter = observer_map.begin();
|
| iter != observer_map.end(); ++iter) {
|
| - network_event_log::AddEntry(kLogModule, "StopObserving", iter->first);
|
| + NET_LOG_DEBUG("StopObserving", iter->first);
|
| delete iter->second;
|
| }
|
| observer_map.swap(new_observed);
|
| @@ -336,9 +342,8 @@ void ShillPropertyHandler::UpdateObserved(ManagedState::ManagedType type,
|
| void ShillPropertyHandler::UpdateAvailableTechnologies(
|
| const base::ListValue& technologies) {
|
| available_technologies_.clear();
|
| - network_event_log::AddEntry(
|
| - kLogModule, "AvailableTechnologiesChanged",
|
| - base::StringPrintf("Size: %"PRIuS, technologies.GetSize()));
|
| + NET_LOG_EVENT("AvailableTechnologiesChanged",
|
| + base::StringPrintf("Size: %"PRIuS, technologies.GetSize()));
|
| for (base::ListValue::const_iterator iter = technologies.begin();
|
| iter != technologies.end(); ++iter) {
|
| std::string technology;
|
| @@ -351,9 +356,8 @@ void ShillPropertyHandler::UpdateAvailableTechnologies(
|
| void ShillPropertyHandler::UpdateEnabledTechnologies(
|
| const base::ListValue& technologies) {
|
| enabled_technologies_.clear();
|
| - network_event_log::AddEntry(
|
| - kLogModule, "EnabledTechnologiesChanged",
|
| - base::StringPrintf("Size: %"PRIuS, technologies.GetSize()));
|
| + NET_LOG_EVENT("EnabledTechnologiesChanged",
|
| + base::StringPrintf("Size: %"PRIuS, technologies.GetSize()));
|
| for (base::ListValue::const_iterator iter = technologies.begin();
|
| iter != technologies.end(); ++iter) {
|
| std::string technology;
|
| @@ -367,9 +371,8 @@ void ShillPropertyHandler::UpdateEnabledTechnologies(
|
| void ShillPropertyHandler::UpdateUninitializedTechnologies(
|
| const base::ListValue& technologies) {
|
| uninitialized_technologies_.clear();
|
| - network_event_log::AddEntry(
|
| - kLogModule, "UninitializedTechnologiesChanged",
|
| - base::StringPrintf("Size: %"PRIuS, technologies.GetSize()));
|
| + NET_LOG_EVENT("UninitializedTechnologiesChanged",
|
| + base::StringPrintf("Size: %"PRIuS, technologies.GetSize()));
|
| for (base::ListValue::const_iterator iter = technologies.begin();
|
| iter != technologies.end(); ++iter) {
|
| std::string technology;
|
| @@ -386,7 +389,7 @@ void ShillPropertyHandler::EnableTechnologyFailed(
|
| const std::string& error_message) {
|
| enabling_technologies_.erase(technology);
|
| network_handler::ShillErrorCallbackFunction(
|
| - kLogModule, technology, error_callback, error_name, error_message);
|
| + technology, error_callback, error_name, error_message);
|
| }
|
|
|
| void ShillPropertyHandler::GetPropertiesCallback(
|
|
|