Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: chromeos/network/network_state_handler.cc

Issue 288923005: Improve logging of Devices and Technologies (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + use const_iterator Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/dbus/fake_shill_device_client.cc ('k') | chromeos/network/shill_property_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/guid.h" 9 #include "base/guid.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 if (!favorite->IsInProfile()) 724 if (!favorite->IsInProfile())
725 continue; 725 continue;
726 if (favorite->IsPrivate()) 726 if (favorite->IsPrivate())
727 ++unshared; 727 ++unshared;
728 else 728 else
729 ++shared; 729 ++shared;
730 } 730 }
731 UMA_HISTOGRAM_COUNTS_100("Networks.RememberedShared", shared); 731 UMA_HISTOGRAM_COUNTS_100("Networks.RememberedShared", shared);
732 UMA_HISTOGRAM_COUNTS_100("Networks.RememberedUnshared", unshared); 732 UMA_HISTOGRAM_COUNTS_100("Networks.RememberedUnshared", unshared);
733 } else if (type == ManagedState::MANAGED_TYPE_DEVICE) { 733 } else if (type == ManagedState::MANAGED_TYPE_DEVICE) {
734 std::string devices;
735 for (ManagedStateList::const_iterator iter = device_list_.begin();
736 iter != device_list_.end(); ++iter) {
737 if (iter != device_list_.begin())
738 devices += ", ";
739 devices += (*iter)->name();
740 }
741 NET_LOG_EVENT("DeviceList:", devices);
734 NotifyDeviceListChanged(); 742 NotifyDeviceListChanged();
735 } else { 743 } else {
736 NOTREACHED(); 744 NOTREACHED();
737 } 745 }
738 } 746 }
739 747
740 void NetworkStateHandler::DefaultNetworkServiceChanged( 748 void NetworkStateHandler::DefaultNetworkServiceChanged(
741 const std::string& service_path) { 749 const std::string& service_path) {
742 // Shill uses '/' for empty service path values; check explicitly for that. 750 // Shill uses '/' for empty service path values; check explicitly for that.
743 const char* kEmptyServicePath = "/"; 751 const char* kEmptyServicePath = "/";
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 if (type.MatchesType(shill::kTypeBluetooth)) 962 if (type.MatchesType(shill::kTypeBluetooth))
955 technologies.push_back(new std::string(shill::kTypeBluetooth)); 963 technologies.push_back(new std::string(shill::kTypeBluetooth));
956 if (type.MatchesType(shill::kTypeVPN)) 964 if (type.MatchesType(shill::kTypeVPN))
957 technologies.push_back(new std::string(shill::kTypeVPN)); 965 technologies.push_back(new std::string(shill::kTypeVPN));
958 966
959 CHECK_GT(technologies.size(), 0ul); 967 CHECK_GT(technologies.size(), 0ul);
960 return technologies.Pass(); 968 return technologies.Pass();
961 } 969 }
962 970
963 } // namespace chromeos 971 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_shill_device_client.cc ('k') | chromeos/network/shill_property_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698