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_state_handler.h" | 5 #include "chromeos/network/network_state_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 const NetworkState* ethernet_service = *it; | 624 const NetworkState* ethernet_service = *it; |
625 if (ethernet_service->update_received() || | 625 if (ethernet_service->update_received() || |
626 ethernet_service->device_path() != device->path()) { | 626 ethernet_service->device_path() != device->path()) { |
627 continue; | 627 continue; |
628 } | 628 } |
629 RequestUpdateForNetwork(ethernet_service->path()); | 629 RequestUpdateForNetwork(ethernet_service->path()); |
630 } | 630 } |
631 } | 631 } |
632 } | 632 } |
633 | 633 |
| 634 void NetworkStateHandler::UpdateIPConfigProperites( |
| 635 ManagedState::ManagedType type, |
| 636 const std::string& path, |
| 637 const std::string& ip_config_path, |
| 638 const base::DictionaryValue& properties) { |
| 639 if (type == ManagedState::MANAGED_TYPE_NETWORK) { |
| 640 NetworkState* network = GetModifiableNetworkState(path); |
| 641 if (!network) |
| 642 return; |
| 643 network->IPConfigPropertiesChanged(properties); |
| 644 } else if (type == ManagedState::MANAGED_TYPE_DEVICE) { |
| 645 DeviceState* device = GetModifiableDeviceState(path); |
| 646 if (!device) |
| 647 return; |
| 648 device->IPConfigPropertiesChanged(ip_config_path, properties); |
| 649 } |
| 650 } |
| 651 |
634 void NetworkStateHandler::CheckPortalListChanged( | 652 void NetworkStateHandler::CheckPortalListChanged( |
635 const std::string& check_portal_list) { | 653 const std::string& check_portal_list) { |
636 check_portal_list_ = check_portal_list; | 654 check_portal_list_ = check_portal_list; |
637 } | 655 } |
638 | 656 |
639 void NetworkStateHandler::TechnologyListChanged() { | 657 void NetworkStateHandler::TechnologyListChanged() { |
640 // Eventually we would like to replace Technology state with Device state. | 658 // Eventually we would like to replace Technology state with Device state. |
641 // For now, treat technology state changes as device list changes. | 659 // For now, treat technology state changes as device list changes. |
642 NotifyDeviceListChanged(); | 660 NotifyDeviceListChanged(); |
643 } | 661 } |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 if (type.MatchesType(shill::kTypeBluetooth)) | 862 if (type.MatchesType(shill::kTypeBluetooth)) |
845 technologies.push_back(new std::string(shill::kTypeBluetooth)); | 863 technologies.push_back(new std::string(shill::kTypeBluetooth)); |
846 if (type.MatchesType(shill::kTypeVPN)) | 864 if (type.MatchesType(shill::kTypeVPN)) |
847 technologies.push_back(new std::string(shill::kTypeVPN)); | 865 technologies.push_back(new std::string(shill::kTypeVPN)); |
848 | 866 |
849 CHECK_GT(technologies.size(), 0ul); | 867 CHECK_GT(technologies.size(), 0ul); |
850 return technologies.Pass(); | 868 return technologies.Pass(); |
851 } | 869 } |
852 | 870 |
853 } // namespace chromeos | 871 } // namespace chromeos |
OLD | NEW |