| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // other platforms. For now, it's just a stub. This is a serious work in | 151 // other platforms. For now, it's just a stub. This is a serious work in |
| 152 // progress and should not be taken as an indication of a real refactoring. | 152 // progress and should not be taken as an indication of a real refactoring. |
| 153 | 153 |
| 154 #if defined(OS_WIN) | 154 #if defined(OS_WIN) |
| 155 #include "base/environment.h" // For PreRead experiment. | 155 #include "base/environment.h" // For PreRead experiment. |
| 156 #include "base/win/windows_version.h" | 156 #include "base/win/windows_version.h" |
| 157 #include "chrome/browser/browser_trial.h" | 157 #include "chrome/browser/browser_trial.h" |
| 158 #include "chrome/browser/browser_util_win.h" | 158 #include "chrome/browser/browser_util_win.h" |
| 159 #include "chrome/browser/first_run/try_chrome_dialog_view.h" | 159 #include "chrome/browser/first_run/try_chrome_dialog_view.h" |
| 160 #include "chrome/browser/first_run/upgrade_util_win.h" | 160 #include "chrome/browser/first_run/upgrade_util_win.h" |
| 161 #include "chrome/browser/fragmentation_checker_win.h" |
| 161 #include "chrome/browser/net/url_fixer_upper.h" | 162 #include "chrome/browser/net/url_fixer_upper.h" |
| 162 #include "chrome/browser/rlz/rlz.h" | 163 #include "chrome/browser/rlz/rlz.h" |
| 163 #include "chrome/browser/ui/views/user_data_dir_dialog.h" | 164 #include "chrome/browser/ui/views/user_data_dir_dialog.h" |
| 164 #include "chrome/installer/util/helper.h" | 165 #include "chrome/installer/util/helper.h" |
| 165 #include "chrome/installer/util/install_util.h" | 166 #include "chrome/installer/util/install_util.h" |
| 166 #include "chrome/installer/util/shell_util.h" | 167 #include "chrome/installer/util/shell_util.h" |
| 167 #include "content/browser/user_metrics.h" | 168 #include "content/browser/user_metrics.h" |
| 168 #include "net/base/net_util.h" | 169 #include "net/base/net_util.h" |
| 169 #include "printing/printed_document.h" | 170 #include "printing/printed_document.h" |
| 170 #include "ui/base/l10n/l10n_util_win.h" | 171 #include "ui/base/l10n/l10n_util_win.h" |
| (...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1781 #endif | 1782 #endif |
| 1782 | 1783 |
| 1783 HandleTestParameters(parsed_command_line()); | 1784 HandleTestParameters(parsed_command_line()); |
| 1784 RecordBreakpadStatusUMA(metrics); | 1785 RecordBreakpadStatusUMA(metrics); |
| 1785 about_flags::RecordUMAStatistics(local_state); | 1786 about_flags::RecordUMAStatistics(local_state); |
| 1786 LanguageUsageMetrics::RecordAcceptLanguages( | 1787 LanguageUsageMetrics::RecordAcceptLanguages( |
| 1787 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)); | 1788 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)); |
| 1788 LanguageUsageMetrics::RecordApplicationLanguage( | 1789 LanguageUsageMetrics::RecordApplicationLanguage( |
| 1789 g_browser_process->GetApplicationLocale()); | 1790 g_browser_process->GetApplicationLocale()); |
| 1790 | 1791 |
| 1792 #if defined(OS_WIN) |
| 1793 fragmentation_checker::RecordFragmentationMetricForCurrentModule(); |
| 1794 #endif |
| 1795 |
| 1791 #if defined(OS_CHROMEOS) | 1796 #if defined(OS_CHROMEOS) |
| 1792 metrics->StartExternalMetrics(); | 1797 metrics->StartExternalMetrics(); |
| 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(); |
| 1798 chromeos::CrosLibrary::Get()->GetBrightnessLibrary()->AddObserver( | 1803 chromeos::CrosLibrary::Get()->GetBrightnessLibrary()->AddObserver( |
| 1799 brightness_observer); | 1804 brightness_observer); |
| 1800 | 1805 |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2064 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2069 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2065 (pre_read == "0" || pre_read == "1")) { | 2070 (pre_read == "0" || pre_read == "1")) { |
| 2066 std::string uma_name(name); | 2071 std::string uma_name(name); |
| 2067 uma_name += "_PreRead"; | 2072 uma_name += "_PreRead"; |
| 2068 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2073 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2069 AddPreReadHistogramTime(uma_name.c_str(), time); | 2074 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2070 } | 2075 } |
| 2071 #endif | 2076 #endif |
| 2072 #endif | 2077 #endif |
| 2073 } | 2078 } |
| OLD | NEW |