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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "chrome/browser/extensions/extension_service.h" | 42 #include "chrome/browser/extensions/extension_service.h" |
43 #include "chrome/browser/extensions/extensions_startup.h" | 43 #include "chrome/browser/extensions/extensions_startup.h" |
44 #include "chrome/browser/first_run/upgrade_util.h" | 44 #include "chrome/browser/first_run/upgrade_util.h" |
45 #include "chrome/browser/google/google_search_counter.h" | 45 #include "chrome/browser/google/google_search_counter.h" |
46 #include "chrome/browser/google/google_util.h" | 46 #include "chrome/browser/google/google_util.h" |
47 #include "chrome/browser/gpu_blacklist.h" | 47 #include "chrome/browser/gpu_blacklist.h" |
48 #include "chrome/browser/gpu_util.h" | 48 #include "chrome/browser/gpu_util.h" |
49 #include "chrome/browser/jankometer.h" | 49 #include "chrome/browser/jankometer.h" |
50 #include "chrome/browser/language_usage_metrics.h" | 50 #include "chrome/browser/language_usage_metrics.h" |
51 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 51 #include "chrome/browser/metrics/field_trial_synchronizer.h" |
52 #include "chrome/browser/metrics/histogram_synchronizer.h" | |
53 #include "chrome/browser/metrics/metrics_log.h" | 52 #include "chrome/browser/metrics/metrics_log.h" |
54 #include "chrome/browser/metrics/metrics_service.h" | 53 #include "chrome/browser/metrics/metrics_service.h" |
55 #include "chrome/browser/metrics/thread_watcher.h" | 54 #include "chrome/browser/metrics/thread_watcher.h" |
56 #include "chrome/browser/metrics/tracking_synchronizer.h" | 55 #include "chrome/browser/metrics/tracking_synchronizer.h" |
57 #include "chrome/browser/metrics/variations_service.h" | 56 #include "chrome/browser/metrics/variations_service.h" |
58 #include "chrome/browser/nacl_host/nacl_process_host.h" | 57 #include "chrome/browser/nacl_host/nacl_process_host.h" |
59 #include "chrome/browser/net/chrome_net_log.h" | 58 #include "chrome/browser/net/chrome_net_log.h" |
60 #include "chrome/browser/net/predictor.h" | 59 #include "chrome/browser/net/predictor.h" |
61 #include "chrome/browser/notifications/desktop_notification_service.h" | 60 #include "chrome/browser/notifications/desktop_notification_service.h" |
62 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 61 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
(...skipping 28 matching lines...) Expand all Loading... |
91 #include "chrome/common/env_vars.h" | 90 #include "chrome/common/env_vars.h" |
92 #include "chrome/common/json_pref_store.h" | 91 #include "chrome/common/json_pref_store.h" |
93 #include "chrome/common/jstemplate_builder.h" | 92 #include "chrome/common/jstemplate_builder.h" |
94 #include "chrome/common/logging_chrome.h" | 93 #include "chrome/common/logging_chrome.h" |
95 #include "chrome/common/metrics/experiments_helper.h" | 94 #include "chrome/common/metrics/experiments_helper.h" |
96 #include "chrome/common/net/net_resource_provider.h" | 95 #include "chrome/common/net/net_resource_provider.h" |
97 #include "chrome/common/pref_names.h" | 96 #include "chrome/common/pref_names.h" |
98 #include "chrome/common/profiling.h" | 97 #include "chrome/common/profiling.h" |
99 #include "chrome/installer/util/google_update_settings.h" | 98 #include "chrome/installer/util/google_update_settings.h" |
100 #include "content/public/browser/browser_thread.h" | 99 #include "content/public/browser/browser_thread.h" |
| 100 #include "content/public/browser/histogram_synchronizer.h" |
101 #include "content/public/browser/gpu_data_manager.h" | 101 #include "content/public/browser/gpu_data_manager.h" |
102 #include "content/public/browser/render_process_host.h" | 102 #include "content/public/browser/render_process_host.h" |
103 #include "content/public/common/content_client.h" | 103 #include "content/public/common/content_client.h" |
104 #include "content/public/common/main_function_params.h" | 104 #include "content/public/common/main_function_params.h" |
105 #include "grit/app_locale_settings.h" | 105 #include "grit/app_locale_settings.h" |
106 #include "grit/browser_resources.h" | 106 #include "grit/browser_resources.h" |
107 #include "grit/chromium_strings.h" | 107 #include "grit/chromium_strings.h" |
108 #include "grit/generated_resources.h" | 108 #include "grit/generated_resources.h" |
109 #include "grit/platform_locale_settings.h" | 109 #include "grit/platform_locale_settings.h" |
110 #include "net/base/net_module.h" | 110 #include "net/base/net_module.h" |
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1368 child_process_logging::SetChannel( | 1368 child_process_logging::SetChannel( |
1369 chrome::VersionInfo::GetVersionStringModifier()); | 1369 chrome::VersionInfo::GetVersionStringModifier()); |
1370 #endif | 1370 #endif |
1371 | 1371 |
1372 InitializeNetworkOptions(parsed_command_line()); | 1372 InitializeNetworkOptions(parsed_command_line()); |
1373 | 1373 |
1374 // Initialize histogram synchronizer system. This is a singleton and is used | 1374 // Initialize histogram synchronizer system. This is a singleton and is used |
1375 // for posting tasks via base::Bind. Its deleted when it goes out of scope. | 1375 // for posting tasks via base::Bind. Its deleted when it goes out of scope. |
1376 // Even though base::Bind does AddRef and Release, the object will not | 1376 // Even though base::Bind does AddRef and Release, the object will not |
1377 // be deleted after the Task is executed. | 1377 // be deleted after the Task is executed. |
1378 histogram_synchronizer_ = new HistogramSynchronizer(); | 1378 histogram_synchronizer_ = content::HistogramSynchronizer::GetInstance(); |
1379 tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer(); | 1379 tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer(); |
1380 | 1380 |
1381 // Now that all preferences have been registered, set the install date | 1381 // Now that all preferences have been registered, set the install date |
1382 // for the uninstall metrics if this is our first run. This only actually | 1382 // for the uninstall metrics if this is our first run. This only actually |
1383 // gets used if the user has metrics reporting enabled at uninstall time. | 1383 // gets used if the user has metrics reporting enabled at uninstall time. |
1384 int64 install_date = | 1384 int64 install_date = |
1385 local_state_->GetInt64(prefs::kUninstallMetricsInstallDate); | 1385 local_state_->GetInt64(prefs::kUninstallMetricsInstallDate); |
1386 if (install_date == 0) { | 1386 if (install_date == 0) { |
1387 local_state_->SetInt64(prefs::kUninstallMetricsInstallDate, | 1387 local_state_->SetInt64(prefs::kUninstallMetricsInstallDate, |
1388 base::Time::Now().ToTimeT()); | 1388 base::Time::Now().ToTimeT()); |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2005 if (base::win::GetVersion() <= base::win::VERSION_XP) | 2005 if (base::win::GetVersion() <= base::win::VERSION_XP) |
2006 uma_name += "_XP"; | 2006 uma_name += "_XP"; |
2007 | 2007 |
2008 uma_name += "_PreRead_"; | 2008 uma_name += "_PreRead_"; |
2009 uma_name += pre_read_percentage; | 2009 uma_name += pre_read_percentage; |
2010 AddPreReadHistogramTime(uma_name.c_str(), time); | 2010 AddPreReadHistogramTime(uma_name.c_str(), time); |
2011 } | 2011 } |
2012 #endif | 2012 #endif |
2013 #endif | 2013 #endif |
2014 } | 2014 } |
OLD | NEW |