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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "chrome/browser/extensions/extensions_startup.h" | 45 #include "chrome/browser/extensions/extensions_startup.h" |
46 #include "chrome/browser/first_run/upgrade_util.h" | 46 #include "chrome/browser/first_run/upgrade_util.h" |
47 #include "chrome/browser/google/google_search_counter.h" | 47 #include "chrome/browser/google/google_search_counter.h" |
48 #include "chrome/browser/google/google_util.h" | 48 #include "chrome/browser/google/google_util.h" |
49 #include "chrome/browser/gpu_blacklist.h" | 49 #include "chrome/browser/gpu_blacklist.h" |
50 #include "chrome/browser/gpu_util.h" | 50 #include "chrome/browser/gpu_util.h" |
51 #include "chrome/browser/jankometer.h" | 51 #include "chrome/browser/jankometer.h" |
52 #include "chrome/browser/language_usage_metrics.h" | 52 #include "chrome/browser/language_usage_metrics.h" |
53 #include "chrome/browser/managed_mode.h" | 53 #include "chrome/browser/managed_mode.h" |
54 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 54 #include "chrome/browser/metrics/field_trial_synchronizer.h" |
55 #include "chrome/browser/metrics/histogram_synchronizer.h" | |
56 #include "chrome/browser/metrics/metrics_log.h" | 55 #include "chrome/browser/metrics/metrics_log.h" |
57 #include "chrome/browser/metrics/metrics_service.h" | 56 #include "chrome/browser/metrics/metrics_service.h" |
58 #include "chrome/browser/metrics/thread_watcher.h" | 57 #include "chrome/browser/metrics/thread_watcher.h" |
59 #include "chrome/browser/metrics/tracking_synchronizer.h" | 58 #include "chrome/browser/metrics/tracking_synchronizer.h" |
60 #include "chrome/browser/metrics/variations_service.h" | 59 #include "chrome/browser/metrics/variations_service.h" |
61 #include "chrome/browser/nacl_host/nacl_process_host.h" | 60 #include "chrome/browser/nacl_host/nacl_process_host.h" |
62 #include "chrome/browser/net/chrome_net_log.h" | 61 #include "chrome/browser/net/chrome_net_log.h" |
63 #include "chrome/browser/net/predictor.h" | 62 #include "chrome/browser/net/predictor.h" |
64 #include "chrome/browser/notifications/desktop_notification_service.h" | 63 #include "chrome/browser/notifications/desktop_notification_service.h" |
65 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 64 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1395 WarnAboutMinimumSystemRequirements(); | 1394 WarnAboutMinimumSystemRequirements(); |
1396 | 1395 |
1397 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX) | 1396 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX) |
1398 // Set the product channel for crash reports. | 1397 // Set the product channel for crash reports. |
1399 child_process_logging::SetChannel( | 1398 child_process_logging::SetChannel( |
1400 chrome::VersionInfo::GetVersionStringModifier()); | 1399 chrome::VersionInfo::GetVersionStringModifier()); |
1401 #endif | 1400 #endif |
1402 | 1401 |
1403 InitializeNetworkOptions(parsed_command_line()); | 1402 InitializeNetworkOptions(parsed_command_line()); |
1404 | 1403 |
1405 // Initialize histogram synchronizer system. This is a singleton and is used | 1404 // Initialize tracking synchronizer system. |
1406 // for posting tasks via base::Bind. Its deleted when it goes out of scope. | |
1407 // Even though base::Bind does AddRef and Release, the object will not | |
1408 // be deleted after the Task is executed. | |
1409 histogram_synchronizer_ = new HistogramSynchronizer(); | |
1410 tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer(); | 1405 tracking_synchronizer_ = new chrome_browser_metrics::TrackingSynchronizer(); |
1411 | 1406 |
1412 // Now that all preferences have been registered, set the install date | 1407 // Now that all preferences have been registered, set the install date |
1413 // for the uninstall metrics if this is our first run. This only actually | 1408 // for the uninstall metrics if this is our first run. This only actually |
1414 // gets used if the user has metrics reporting enabled at uninstall time. | 1409 // gets used if the user has metrics reporting enabled at uninstall time. |
1415 int64 install_date = | 1410 int64 install_date = |
1416 local_state_->GetInt64(prefs::kUninstallMetricsInstallDate); | 1411 local_state_->GetInt64(prefs::kUninstallMetricsInstallDate); |
1417 if (install_date == 0) { | 1412 if (install_date == 0) { |
1418 local_state_->SetInt64(prefs::kUninstallMetricsInstallDate, | 1413 local_state_->SetInt64(prefs::kUninstallMetricsInstallDate, |
1419 base::Time::Now().ToTimeT()); | 1414 base::Time::Now().ToTimeT()); |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2075 if (base::win::GetVersion() <= base::win::VERSION_XP) | 2070 if (base::win::GetVersion() <= base::win::VERSION_XP) |
2076 uma_name += "_XP"; | 2071 uma_name += "_XP"; |
2077 | 2072 |
2078 uma_name += "_PreRead_"; | 2073 uma_name += "_PreRead_"; |
2079 uma_name += pre_read_percentage; | 2074 uma_name += pre_read_percentage; |
2080 AddPreReadHistogramTime(uma_name.c_str(), time); | 2075 AddPreReadHistogramTime(uma_name.c_str(), time); |
2081 } | 2076 } |
2082 #endif | 2077 #endif |
2083 #endif | 2078 #endif |
2084 } | 2079 } |
OLD | NEW |