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 "chrome/browser/metrics/metrics_log.h" | 5 #include "chrome/browser/metrics/metrics_log.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 #endif | 700 #endif |
701 | 701 |
702 SystemProfileProto::Network* network = system_profile->mutable_network(); | 702 SystemProfileProto::Network* network = system_profile->mutable_network(); |
703 network->set_connection_type_is_ambiguous( | 703 network->set_connection_type_is_ambiguous( |
704 network_observer_.connection_type_is_ambiguous()); | 704 network_observer_.connection_type_is_ambiguous()); |
705 network->set_connection_type(network_observer_.connection_type()); | 705 network->set_connection_type(network_observer_.connection_type()); |
706 network->set_wifi_phy_layer_protocol_is_ambiguous( | 706 network->set_wifi_phy_layer_protocol_is_ambiguous( |
707 network_observer_.wifi_phy_layer_protocol_is_ambiguous()); | 707 network_observer_.wifi_phy_layer_protocol_is_ambiguous()); |
708 network->set_wifi_phy_layer_protocol( | 708 network->set_wifi_phy_layer_protocol( |
709 network_observer_.wifi_phy_layer_protocol()); | 709 network_observer_.wifi_phy_layer_protocol()); |
| 710 |
| 711 #if defined(OS_ANDROID) |
| 712 SystemProfileProto::Network::NetworkOperator* network_operator = |
| 713 network->mutable_network_operator(); |
| 714 network_operator->set_id(network_observer_.network_operator_id()); |
| 715 #endif |
| 716 |
710 network_observer_.Reset(); | 717 network_observer_.Reset(); |
711 | 718 |
712 SystemProfileProto::OS* os = system_profile->mutable_os(); | 719 SystemProfileProto::OS* os = system_profile->mutable_os(); |
713 std::string os_name = base::SysInfo::OperatingSystemName(); | 720 std::string os_name = base::SysInfo::OperatingSystemName(); |
714 #if defined(OS_WIN) | 721 #if defined(OS_WIN) |
715 // TODO(mad): This only checks whether the main process is a Metro process at | 722 // TODO(mad): This only checks whether the main process is a Metro process at |
716 // upload time; not whether the collected metrics were all gathered from | 723 // upload time; not whether the collected metrics were all gathered from |
717 // Metro. This is ok as an approximation for now, since users will rarely be | 724 // Metro. This is ok as an approximation for now, since users will rarely be |
718 // switching from Metro to Desktop mode; but we should re-evaluate whether we | 725 // switching from Metro to Desktop mode; but we should re-evaluate whether we |
719 // can distinguish metrics more cleanly in the future: http://crbug.com/140568 | 726 // can distinguish metrics more cleanly in the future: http://crbug.com/140568 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 ProductDataToProto(google_update_metrics.google_update_data, | 909 ProductDataToProto(google_update_metrics.google_update_data, |
903 google_update->mutable_google_update_status()); | 910 google_update->mutable_google_update_status()); |
904 } | 911 } |
905 | 912 |
906 if (!google_update_metrics.product_data.version.empty()) { | 913 if (!google_update_metrics.product_data.version.empty()) { |
907 ProductDataToProto(google_update_metrics.product_data, | 914 ProductDataToProto(google_update_metrics.product_data, |
908 google_update->mutable_client_status()); | 915 google_update->mutable_client_status()); |
909 } | 916 } |
910 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) | 917 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) |
911 } | 918 } |
OLD | NEW |