Chromium Code Reviews| 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 684 if (!favorite->IsFavorite()) | 684 if (!favorite->IsFavorite()) |
| 685 continue; | 685 continue; |
| 686 if (favorite->IsPrivate()) | 686 if (favorite->IsPrivate()) |
| 687 ++unshared; | 687 ++unshared; |
| 688 else | 688 else |
| 689 ++shared; | 689 ++shared; |
| 690 } | 690 } |
| 691 UMA_HISTOGRAM_COUNTS_100("Networks.RememberedShared", shared); | 691 UMA_HISTOGRAM_COUNTS_100("Networks.RememberedShared", shared); |
| 692 UMA_HISTOGRAM_COUNTS_100("Networks.RememberedUnshared", unshared); | 692 UMA_HISTOGRAM_COUNTS_100("Networks.RememberedUnshared", unshared); |
| 693 } else if (type == ManagedState::MANAGED_TYPE_DEVICE) { | 693 } else if (type == ManagedState::MANAGED_TYPE_DEVICE) { |
| 694 std::string devices; | |
| 695 for (ManagedStateList::iterator iter = device_list_.begin(); | |
|
Ben Chan
2014/05/15 22:56:45
can it be const_iterator?
stevenjb
2014/05/20 18:27:24
Done.
| |
| 696 iter != device_list_.end(); ++iter) { | |
| 697 if (iter != device_list_.begin()) | |
| 698 devices += ", "; | |
| 699 devices += (*iter)->name(); | |
| 700 } | |
| 701 NET_LOG_EVENT("DeviceList:", devices); | |
| 694 NotifyDeviceListChanged(); | 702 NotifyDeviceListChanged(); |
| 695 } else { | 703 } else { |
| 696 NOTREACHED(); | 704 NOTREACHED(); |
| 697 } | 705 } |
| 698 } | 706 } |
| 699 | 707 |
| 700 void NetworkStateHandler::DefaultNetworkServiceChanged( | 708 void NetworkStateHandler::DefaultNetworkServiceChanged( |
| 701 const std::string& service_path) { | 709 const std::string& service_path) { |
| 702 // Shill uses '/' for empty service path values; check explicitly for that. | 710 // Shill uses '/' for empty service path values; check explicitly for that. |
| 703 const char* kEmptyServicePath = "/"; | 711 const char* kEmptyServicePath = "/"; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 862 if (type.MatchesType(shill::kTypeBluetooth)) | 870 if (type.MatchesType(shill::kTypeBluetooth)) |
| 863 technologies.push_back(new std::string(shill::kTypeBluetooth)); | 871 technologies.push_back(new std::string(shill::kTypeBluetooth)); |
| 864 if (type.MatchesType(shill::kTypeVPN)) | 872 if (type.MatchesType(shill::kTypeVPN)) |
| 865 technologies.push_back(new std::string(shill::kTypeVPN)); | 873 technologies.push_back(new std::string(shill::kTypeVPN)); |
| 866 | 874 |
| 867 CHECK_GT(technologies.size(), 0ul); | 875 CHECK_GT(technologies.size(), 0ul); |
| 868 return technologies.Pass(); | 876 return technologies.Pass(); |
| 869 } | 877 } |
| 870 | 878 |
| 871 } // namespace chromeos | 879 } // namespace chromeos |
| OLD | NEW |