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/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 } | 373 } |
374 if (is_observing) | 374 if (is_observing) |
375 managed->set_is_observed(true); | 375 managed->set_is_observed(true); |
376 if (request_properties) | 376 if (request_properties) |
377 shill_property_handler_->RequestProperties(type, path); | 377 shill_property_handler_->RequestProperties(type, path); |
378 } | 378 } |
379 // Delete any remaning entries in managed_map. | 379 // Delete any remaning entries in managed_map. |
380 STLDeleteContainerPairSecondPointers(managed_map.begin(), managed_map.end()); | 380 STLDeleteContainerPairSecondPointers(managed_map.begin(), managed_map.end()); |
381 } | 381 } |
382 | 382 |
| 383 void NetworkStateHandler::ProfileListChanged() { |
| 384 network_event_log::AddEntry( |
| 385 kLogModule, "ProfileListChanged", "Re-Requesting Network Properties"); |
| 386 for (ManagedStateList::iterator iter = network_list_.begin(); |
| 387 iter != network_list_.end(); ++iter) { |
| 388 shill_property_handler_->RequestProperties( |
| 389 ManagedState::MANAGED_TYPE_NETWORK, (*iter)->path()); |
| 390 } |
| 391 } |
| 392 |
383 void NetworkStateHandler::UpdateManagedStateProperties( | 393 void NetworkStateHandler::UpdateManagedStateProperties( |
384 ManagedState::ManagedType type, | 394 ManagedState::ManagedType type, |
385 const std::string& path, | 395 const std::string& path, |
386 const base::DictionaryValue& properties) { | 396 const base::DictionaryValue& properties) { |
387 ManagedState* managed = GetModifiableManagedState(GetManagedList(type), path); | 397 ManagedState* managed = GetModifiableManagedState(GetManagedList(type), path); |
388 if (!managed) { | 398 if (!managed) { |
389 LOG(ERROR) << "GetPropertiesCallback: " << path << " Not found!"; | 399 LOG(ERROR) << "GetPropertiesCallback: " << path << " Not found!"; |
390 return; | 400 return; |
391 } | 401 } |
392 bool network_property_updated = false; | 402 bool network_property_updated = false; |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 return; | 608 return; |
599 ScanCallbackList& callback_list = scan_complete_callbacks_[type]; | 609 ScanCallbackList& callback_list = scan_complete_callbacks_[type]; |
600 for (ScanCallbackList::iterator iter = callback_list.begin(); | 610 for (ScanCallbackList::iterator iter = callback_list.begin(); |
601 iter != callback_list.end(); ++iter) { | 611 iter != callback_list.end(); ++iter) { |
602 (*iter).Run(); | 612 (*iter).Run(); |
603 } | 613 } |
604 scan_complete_callbacks_.erase(type); | 614 scan_complete_callbacks_.erase(type); |
605 } | 615 } |
606 | 616 |
607 } // namespace chromeos | 617 } // namespace chromeos |
OLD | NEW |