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

Side by Side Diff: chrome/browser/metrics/metrics_log.cc

Issue 246553003: Record Mobile Operator ID in UMA report. This is Android only for now. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@operator_id
Patch Set: addressed comments. Created 6 years, 8 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
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 "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
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 network->set_mcc_mnc(network_observer_.network_operator_id());
713 #endif
714
710 network_observer_.Reset(); 715 network_observer_.Reset();
711 716
712 SystemProfileProto::OS* os = system_profile->mutable_os(); 717 SystemProfileProto::OS* os = system_profile->mutable_os();
713 std::string os_name = base::SysInfo::OperatingSystemName(); 718 std::string os_name = base::SysInfo::OperatingSystemName();
714 #if defined(OS_WIN) 719 #if defined(OS_WIN)
715 // TODO(mad): This only checks whether the main process is a Metro process at 720 // 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 721 // 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 722 // 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 723 // 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 724 // can distinguish metrics more cleanly in the future: http://crbug.com/140568
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 ProductDataToProto(google_update_metrics.google_update_data, 907 ProductDataToProto(google_update_metrics.google_update_data,
903 google_update->mutable_google_update_status()); 908 google_update->mutable_google_update_status());
904 } 909 }
905 910
906 if (!google_update_metrics.product_data.version.empty()) { 911 if (!google_update_metrics.product_data.version.empty()) {
907 ProductDataToProto(google_update_metrics.product_data, 912 ProductDataToProto(google_update_metrics.product_data,
908 google_update->mutable_client_status()); 913 google_update->mutable_client_status());
909 } 914 }
910 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) 915 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)
911 } 916 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698