| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 | 195 |
| 196 #if defined(OS_WIN) | 196 #if defined(OS_WIN) |
| 197 #include "base/trace_event/trace_event_etw_export_win.h" | 197 #include "base/trace_event/trace_event_etw_export_win.h" |
| 198 #include "base/win/windows_version.h" | 198 #include "base/win/windows_version.h" |
| 199 #include "chrome/app/file_pre_reader_win.h" | 199 #include "chrome/app/file_pre_reader_win.h" |
| 200 #include "chrome/browser/browser_util_win.h" | 200 #include "chrome/browser/browser_util_win.h" |
| 201 #include "chrome/browser/chrome_browser_main_win.h" | 201 #include "chrome/browser/chrome_browser_main_win.h" |
| 202 #include "chrome/browser/chrome_select_file_dialog_factory_win.h" | 202 #include "chrome/browser/chrome_select_file_dialog_factory_win.h" |
| 203 #include "chrome/browser/component_updater/caps_installer_win.h" | 203 #include "chrome/browser/component_updater/caps_installer_win.h" |
| 204 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" | 204 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" |
| 205 #include "chrome/browser/downgrade/user_data_downgrade.h" |
| 205 #include "chrome/browser/first_run/try_chrome_dialog_view.h" | 206 #include "chrome/browser/first_run/try_chrome_dialog_view.h" |
| 206 #include "chrome/browser/first_run/upgrade_util_win.h" | 207 #include "chrome/browser/first_run/upgrade_util_win.h" |
| 207 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" | 208 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" |
| 208 #include "chrome/browser/ui/network_profile_bubble.h" | 209 #include "chrome/browser/ui/network_profile_bubble.h" |
| 209 #include "chrome/installer/util/browser_distribution.h" | 210 #include "chrome/installer/util/browser_distribution.h" |
| 210 #include "chrome/installer/util/helper.h" | 211 #include "chrome/installer/util/helper.h" |
| 211 #include "chrome/installer/util/install_util.h" | 212 #include "chrome/installer/util/install_util.h" |
| 212 #include "chrome/installer/util/module_util_win.h" | 213 #include "chrome/installer/util/module_util_win.h" |
| 213 #include "chrome/installer/util/shell_util.h" | 214 #include "chrome/installer/util/shell_util.h" |
| 214 #include "components/startup_metric_utils/common/pre_read_field_trial_utils_win.
h" | 215 #include "components/startup_metric_utils/common/pre_read_field_trial_utils_win.
h" |
| (...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1769 // main message loop. | 1770 // main message loop. |
| 1770 std::vector<Profile*> last_opened_profiles; | 1771 std::vector<Profile*> last_opened_profiles; |
| 1771 #if !defined(OS_CHROMEOS) | 1772 #if !defined(OS_CHROMEOS) |
| 1772 // On ChromeOS multiple profiles doesn't apply, and will break if we load | 1773 // On ChromeOS multiple profiles doesn't apply, and will break if we load |
| 1773 // them this early as the cryptohome hasn't yet been mounted (which happens | 1774 // them this early as the cryptohome hasn't yet been mounted (which happens |
| 1774 // only once we log in). | 1775 // only once we log in). |
| 1775 last_opened_profiles = | 1776 last_opened_profiles = |
| 1776 g_browser_process->profile_manager()->GetLastOpenedProfiles(); | 1777 g_browser_process->profile_manager()->GetLastOpenedProfiles(); |
| 1777 #endif // defined(OS_CHROMEOS) | 1778 #endif // defined(OS_CHROMEOS) |
| 1778 | 1779 |
| 1780 #if defined(OS_WIN) |
| 1781 // Clean up old user data directory and disk cache directory. |
| 1782 downgrade::DeleteMovedUserDataSoon(); |
| 1783 #endif |
| 1784 |
| 1779 UMA_HISTOGRAM_TIMES("Startup.PreMainMessageLoopRunImplStep2Time", | 1785 UMA_HISTOGRAM_TIMES("Startup.PreMainMessageLoopRunImplStep2Time", |
| 1780 base::TimeTicks::Now() - start_time_step2); | 1786 base::TimeTicks::Now() - start_time_step2); |
| 1781 | 1787 |
| 1782 // This step is costly and is already measured in | 1788 // This step is costly and is already measured in |
| 1783 // Startup.StartupBrowserCreator_Start. | 1789 // Startup.StartupBrowserCreator_Start. |
| 1784 const bool started = browser_creator_->Start( | 1790 const bool started = browser_creator_->Start( |
| 1785 parsed_command_line(), base::FilePath(), profile_, last_opened_profiles); | 1791 parsed_command_line(), base::FilePath(), profile_, last_opened_profiles); |
| 1786 const base::TimeTicks start_time_step3 = base::TimeTicks::Now(); | 1792 const base::TimeTicks start_time_step3 = base::TimeTicks::Now(); |
| 1787 if (started) { | 1793 if (started) { |
| 1788 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) | 1794 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1986 chromeos::CrosSettings::Shutdown(); | 1992 chromeos::CrosSettings::Shutdown(); |
| 1987 #endif // defined(OS_CHROMEOS) | 1993 #endif // defined(OS_CHROMEOS) |
| 1988 #endif // defined(OS_ANDROID) | 1994 #endif // defined(OS_ANDROID) |
| 1989 } | 1995 } |
| 1990 | 1996 |
| 1991 // Public members: | 1997 // Public members: |
| 1992 | 1998 |
| 1993 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1999 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1994 chrome_extra_parts_.push_back(parts); | 2000 chrome_extra_parts_.push_back(parts); |
| 1995 } | 2001 } |
| OLD | NEW |