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 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1287 | 1287 |
1288 // Create Sentinel if no-first-run argument is passed in. | 1288 // Create Sentinel if no-first-run argument is passed in. |
1289 if (parsed_command_line().HasSwitch(switches::kNoFirstRun)) | 1289 if (parsed_command_line().HasSwitch(switches::kNoFirstRun)) |
1290 first_run::CreateSentinel(); | 1290 first_run::CreateSentinel(); |
1291 } | 1291 } |
1292 | 1292 |
1293 // TODO(viettrungluu): why don't we run this earlier? | 1293 // TODO(viettrungluu): why don't we run this earlier? |
1294 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) | 1294 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) |
1295 WarnAboutMinimumSystemRequirements(); | 1295 WarnAboutMinimumSystemRequirements(); |
1296 | 1296 |
1297 // Convert active labs into switches. Modifies the current command line. | 1297 #if !defined(OS_ANDROID) |
| 1298 // Convert active labs into switches. Modifies the current command line. Not |
| 1299 // needed on Android as there aren't experimental flags. |
1298 about_flags::ConvertFlagsToSwitches(local_state_, | 1300 about_flags::ConvertFlagsToSwitches(local_state_, |
1299 CommandLine::ForCurrentProcess()); | 1301 CommandLine::ForCurrentProcess()); |
| 1302 #endif |
1300 local_state_->UpdateCommandLinePrefStore(CommandLine::ForCurrentProcess()); | 1303 local_state_->UpdateCommandLinePrefStore(CommandLine::ForCurrentProcess()); |
1301 | 1304 |
1302 // Reset the command line in the crash report details, since we may have | 1305 // Reset the command line in the crash report details, since we may have |
1303 // just changed it to include experiments. | 1306 // just changed it to include experiments. |
1304 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); | 1307 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); |
1305 | 1308 |
1306 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX) | 1309 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_MACOSX) |
1307 // Set the product channel for crash reports. | 1310 // Set the product channel for crash reports. |
1308 child_process_logging::SetChannel( | 1311 child_process_logging::SetChannel( |
1309 chrome::VersionInfo::GetVersionStringModifier()); | 1312 chrome::VersionInfo::GetVersionStringModifier()); |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1699 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) | 1702 #if defined(OS_WIN) && !defined(GOOGLE_CHROME_BUILD) |
1700 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { | 1703 if (parsed_command_line().HasSwitch(switches::kDebugPrint)) { |
1701 FilePath path = | 1704 FilePath path = |
1702 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); | 1705 parsed_command_line().GetSwitchValuePath(switches::kDebugPrint); |
1703 printing::PrintedDocument::set_debug_dump_path(path); | 1706 printing::PrintedDocument::set_debug_dump_path(path); |
1704 } | 1707 } |
1705 #endif | 1708 #endif |
1706 | 1709 |
1707 HandleTestParameters(parsed_command_line()); | 1710 HandleTestParameters(parsed_command_line()); |
1708 RecordBreakpadStatusUMA(browser_process_->metrics_service()); | 1711 RecordBreakpadStatusUMA(browser_process_->metrics_service()); |
| 1712 #if !defined(OS_ANDROID) |
1709 about_flags::RecordUMAStatistics(local_state_); | 1713 about_flags::RecordUMAStatistics(local_state_); |
| 1714 #endif |
1710 LanguageUsageMetrics::RecordAcceptLanguages( | 1715 LanguageUsageMetrics::RecordAcceptLanguages( |
1711 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)); | 1716 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages)); |
1712 LanguageUsageMetrics::RecordApplicationLanguage( | 1717 LanguageUsageMetrics::RecordApplicationLanguage( |
1713 browser_process_->GetApplicationLocale()); | 1718 browser_process_->GetApplicationLocale()); |
1714 | 1719 |
1715 // The extension service may be available at this point. If the command line | 1720 // The extension service may be available at this point. If the command line |
1716 // specifies --uninstall-extension, attempt the uninstall extension startup | 1721 // specifies --uninstall-extension, attempt the uninstall extension startup |
1717 // action. | 1722 // action. |
1718 if (parsed_command_line().HasSwitch(switches::kUninstallExtension)) { | 1723 if (parsed_command_line().HasSwitch(switches::kUninstallExtension)) { |
1719 ExtensionsStartupUtil ext_startup_util; | 1724 ExtensionsStartupUtil ext_startup_util; |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1969 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1974 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1970 uma_name += "_XP"; | 1975 uma_name += "_XP"; |
1971 | 1976 |
1972 uma_name += "_PreRead_"; | 1977 uma_name += "_PreRead_"; |
1973 uma_name += pre_read_percentage; | 1978 uma_name += pre_read_percentage; |
1974 AddPreReadHistogramTime(uma_name.c_str(), time); | 1979 AddPreReadHistogramTime(uma_name.c_str(), time); |
1975 } | 1980 } |
1976 #endif | 1981 #endif |
1977 #endif | 1982 #endif |
1978 } | 1983 } |
OLD | NEW |