| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // other platforms. For now, it's just a stub. This is a serious work in | 153 // other platforms. For now, it's just a stub. This is a serious work in |
| 154 // progress and should not be taken as an indication of a real refactoring. | 154 // progress and should not be taken as an indication of a real refactoring. |
| 155 | 155 |
| 156 #if defined(OS_WIN) | 156 #if defined(OS_WIN) |
| 157 #include "base/environment.h" // For PreRead experiment. | 157 #include "base/environment.h" // For PreRead experiment. |
| 158 #include "base/win/windows_version.h" | 158 #include "base/win/windows_version.h" |
| 159 #include "chrome/browser/browser_trial.h" | 159 #include "chrome/browser/browser_trial.h" |
| 160 #include "chrome/browser/browser_util_win.h" | 160 #include "chrome/browser/browser_util_win.h" |
| 161 #include "chrome/browser/first_run/try_chrome_dialog_view.h" | 161 #include "chrome/browser/first_run/try_chrome_dialog_view.h" |
| 162 #include "chrome/browser/first_run/upgrade_util_win.h" | 162 #include "chrome/browser/first_run/upgrade_util_win.h" |
| 163 #include "chrome/browser/fragmentation_checker_win.h" |
| 163 #include "chrome/browser/net/url_fixer_upper.h" | 164 #include "chrome/browser/net/url_fixer_upper.h" |
| 164 #include "chrome/browser/rlz/rlz.h" | 165 #include "chrome/browser/rlz/rlz.h" |
| 165 #include "chrome/browser/ui/views/user_data_dir_dialog.h" | 166 #include "chrome/browser/ui/views/user_data_dir_dialog.h" |
| 166 #include "chrome/installer/util/helper.h" | 167 #include "chrome/installer/util/helper.h" |
| 167 #include "chrome/installer/util/install_util.h" | 168 #include "chrome/installer/util/install_util.h" |
| 168 #include "chrome/installer/util/shell_util.h" | 169 #include "chrome/installer/util/shell_util.h" |
| 169 #include "content/browser/user_metrics.h" | 170 #include "content/browser/user_metrics.h" |
| 170 #include "net/base/net_util.h" | 171 #include "net/base/net_util.h" |
| 171 #include "printing/printed_document.h" | 172 #include "printing/printed_document.h" |
| 172 #include "ui/base/l10n/l10n_util_win.h" | 173 #include "ui/base/l10n/l10n_util_win.h" |
| (...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1778 #endif | 1779 #endif |
| 1779 | 1780 |
| 1780 HandleTestParameters(parsed_command_line()); | 1781 HandleTestParameters(parsed_command_line()); |
| 1781 RecordBreakpadStatusUMA(metrics); | 1782 RecordBreakpadStatusUMA(metrics); |
| 1782 about_flags::RecordUMAStatistics(local_state); | 1783 about_flags::RecordUMAStatistics(local_state); |
| 1783 LanguageUsageMetrics::RecordAcceptLanguages( | 1784 LanguageUsageMetrics::RecordAcceptLanguages( |
| 1784 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)); | 1785 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)); |
| 1785 LanguageUsageMetrics::RecordApplicationLanguage( | 1786 LanguageUsageMetrics::RecordApplicationLanguage( |
| 1786 g_browser_process->GetApplicationLocale()); | 1787 g_browser_process->GetApplicationLocale()); |
| 1787 | 1788 |
| 1789 #if defined(OS_WIN) |
| 1790 fragmentation_checker::RecordFragmentationMetricForCurrentModule(); |
| 1791 #endif |
| 1792 |
| 1788 #if defined(OS_CHROMEOS) | 1793 #if defined(OS_CHROMEOS) |
| 1789 metrics->StartExternalMetrics(); | 1794 metrics->StartExternalMetrics(); |
| 1790 | 1795 |
| 1791 // Initialize the audio handler on ChromeOS. | 1796 // Initialize the audio handler on ChromeOS. |
| 1792 chromeos::AudioHandler::Initialize(); | 1797 chromeos::AudioHandler::Initialize(); |
| 1793 | 1798 |
| 1794 // Initialize the brightness observer so that we'll display an onscreen | 1799 // Initialize the brightness observer so that we'll display an onscreen |
| 1795 // indication of brightness changes during login. | 1800 // indication of brightness changes during login. |
| 1796 static chromeos::BrightnessObserver* brightness_observer = | 1801 static chromeos::BrightnessObserver* brightness_observer = |
| 1797 new chromeos::BrightnessObserver(); | 1802 new chromeos::BrightnessObserver(); |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2073 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2078 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2074 (pre_read == "0" || pre_read == "1")) { | 2079 (pre_read == "0" || pre_read == "1")) { |
| 2075 std::string uma_name(name); | 2080 std::string uma_name(name); |
| 2076 uma_name += "_PreRead"; | 2081 uma_name += "_PreRead"; |
| 2077 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2082 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2078 AddPreReadHistogramTime(uma_name.c_str(), time); | 2083 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2079 } | 2084 } |
| 2080 #endif | 2085 #endif |
| 2081 #endif | 2086 #endif |
| 2082 } | 2087 } |
| OLD | NEW |