| 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 23 matching lines...) Expand all Loading... |
| 34 #include "chrome/browser/profiles/profile_manager.h" | 34 #include "chrome/browser/profiles/profile_manager.h" |
| 35 #include "chrome/common/chrome_process_type.h" | 35 #include "chrome/common/chrome_process_type.h" |
| 36 #include "chrome/common/chrome_version_info.h" | 36 #include "chrome/common/chrome_version_info.h" |
| 37 #include "chrome/common/logging_chrome.h" | 37 #include "chrome/common/logging_chrome.h" |
| 38 #include "chrome/common/metrics/proto/omnibox_event.pb.h" | 38 #include "chrome/common/metrics/proto/omnibox_event.pb.h" |
| 39 #include "chrome/common/metrics/proto/profiler_event.pb.h" | 39 #include "chrome/common/metrics/proto/profiler_event.pb.h" |
| 40 #include "chrome/common/metrics/proto/system_profile.pb.h" | 40 #include "chrome/common/metrics/proto/system_profile.pb.h" |
| 41 #include "chrome/common/metrics/variations/variations_util.h" | 41 #include "chrome/common/metrics/variations/variations_util.h" |
| 42 #include "chrome/common/pref_names.h" | 42 #include "chrome/common/pref_names.h" |
| 43 #include "chrome/installer/util/google_update_settings.h" | 43 #include "chrome/installer/util/google_update_settings.h" |
| 44 #include "content/public/browser/content_browser_client.h" | |
| 45 #include "content/public/browser/gpu_data_manager.h" | 44 #include "content/public/browser/gpu_data_manager.h" |
| 46 #include "content/public/common/content_client.h" | 45 #include "content/public/common/content_client.h" |
| 47 #include "content/public/common/gpu_info.h" | 46 #include "content/public/common/gpu_info.h" |
| 48 #include "googleurl/src/gurl.h" | 47 #include "googleurl/src/gurl.h" |
| 49 #include "ui/gfx/screen.h" | 48 #include "ui/gfx/screen.h" |
| 50 #include "webkit/plugins/webplugininfo.h" | 49 #include "webkit/plugins/webplugininfo.h" |
| 51 | 50 |
| 52 #if defined(OS_ANDROID) | 51 #if defined(OS_ANDROID) |
| 53 #include "base/android/build_info.h" | 52 #include "base/android/build_info.h" |
| 54 #endif | 53 #endif |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 if (google_util::GetBrand(&brand_code)) | 795 if (google_util::GetBrand(&brand_code)) |
| 797 system_profile->set_brand_code(brand_code); | 796 system_profile->set_brand_code(brand_code); |
| 798 | 797 |
| 799 int enabled_date; | 798 int enabled_date; |
| 800 bool success = base::StringToInt(GetMetricsEnabledDate(GetPrefService()), | 799 bool success = base::StringToInt(GetMetricsEnabledDate(GetPrefService()), |
| 801 &enabled_date); | 800 &enabled_date); |
| 802 DCHECK(success); | 801 DCHECK(success); |
| 803 system_profile->set_uma_enabled_date(enabled_date); | 802 system_profile->set_uma_enabled_date(enabled_date); |
| 804 | 803 |
| 805 system_profile->set_application_locale( | 804 system_profile->set_application_locale( |
| 806 content::GetContentClient()->browser()->GetApplicationLocale()); | 805 g_browser_process->GetApplicationLocale()); |
| 807 | 806 |
| 808 SystemProfileProto::Hardware* hardware = system_profile->mutable_hardware(); | 807 SystemProfileProto::Hardware* hardware = system_profile->mutable_hardware(); |
| 809 hardware->set_cpu_architecture(base::SysInfo::OperatingSystemArchitecture()); | 808 hardware->set_cpu_architecture(base::SysInfo::OperatingSystemArchitecture()); |
| 810 hardware->set_system_ram_mb(base::SysInfo::AmountOfPhysicalMemoryMB()); | 809 hardware->set_system_ram_mb(base::SysInfo::AmountOfPhysicalMemoryMB()); |
| 811 #if defined(OS_WIN) | 810 #if defined(OS_WIN) |
| 812 hardware->set_dll_base(reinterpret_cast<uint64>(&__ImageBase)); | 811 hardware->set_dll_base(reinterpret_cast<uint64>(&__ImageBase)); |
| 813 #endif | 812 #endif |
| 814 | 813 |
| 815 SystemProfileProto::Network* network = system_profile->mutable_network(); | 814 SystemProfileProto::Network* network = system_profile->mutable_network(); |
| 816 network->set_connection_type_is_ambiguous( | 815 network->set_connection_type_is_ambiguous( |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 ProductDataToProto(google_update_metrics.google_update_data, | 1080 ProductDataToProto(google_update_metrics.google_update_data, |
| 1082 google_update->mutable_google_update_status()); | 1081 google_update->mutable_google_update_status()); |
| 1083 } | 1082 } |
| 1084 | 1083 |
| 1085 if (!google_update_metrics.product_data.version.empty()) { | 1084 if (!google_update_metrics.product_data.version.empty()) { |
| 1086 ProductDataToProto(google_update_metrics.product_data, | 1085 ProductDataToProto(google_update_metrics.product_data, |
| 1087 google_update->mutable_client_status()); | 1086 google_update->mutable_client_status()); |
| 1088 } | 1087 } |
| 1089 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) | 1088 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) |
| 1090 } | 1089 } |
| OLD | NEW |