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 | |
393 void NetworkStateHandler::UpdateManagedStateProperties( | 383 void NetworkStateHandler::UpdateManagedStateProperties( |
394 ManagedState::ManagedType type, | 384 ManagedState::ManagedType type, |
395 const std::string& path, | 385 const std::string& path, |
396 const base::DictionaryValue& properties) { | 386 const base::DictionaryValue& properties) { |
397 ManagedState* managed = GetModifiableManagedState(GetManagedList(type), path); | 387 ManagedState* managed = GetModifiableManagedState(GetManagedList(type), path); |
398 if (!managed) { | 388 if (!managed) { |
399 LOG(ERROR) << "GetPropertiesCallback: " << path << " Not found!"; | 389 LOG(ERROR) << "GetPropertiesCallback: " << path << " Not found!"; |
400 return; | 390 return; |
401 } | 391 } |
402 bool network_property_updated = false; | 392 bool network_property_updated = false; |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
608 return; | 598 return; |
609 ScanCallbackList& callback_list = scan_complete_callbacks_[type]; | 599 ScanCallbackList& callback_list = scan_complete_callbacks_[type]; |
610 for (ScanCallbackList::iterator iter = callback_list.begin(); | 600 for (ScanCallbackList::iterator iter = callback_list.begin(); |
611 iter != callback_list.end(); ++iter) { | 601 iter != callback_list.end(); ++iter) { |
612 (*iter).Run(); | 602 (*iter).Run(); |
613 } | 603 } |
614 scan_complete_callbacks_.erase(type); | 604 scan_complete_callbacks_.erase(type); |
615 } | 605 } |
616 | 606 |
617 } // namespace chromeos | 607 } // namespace chromeos |
OLD | NEW |