| 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 1751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1762 delete parameters().ui_task; | 1762 delete parameters().ui_task; |
| 1763 run_message_loop_ = false; | 1763 run_message_loop_ = false; |
| 1764 } else { | 1764 } else { |
| 1765 // Most general initialization is behind us, but opening a | 1765 // Most general initialization is behind us, but opening a |
| 1766 // tab and/or session restore and such is still to be done. | 1766 // tab and/or session restore and such is still to be done. |
| 1767 base::TimeTicks browser_open_start = base::TimeTicks::Now(); | 1767 base::TimeTicks browser_open_start = base::TimeTicks::Now(); |
| 1768 | 1768 |
| 1769 // We are in regular browser boot sequence. Open initial tabs and enter the | 1769 // We are in regular browser boot sequence. Open initial tabs and enter the |
| 1770 // main message loop. | 1770 // main message loop. |
| 1771 int result_code; | 1771 int result_code; |
| 1772 if (browser_init_->Start(parsed_command_line(), FilePath(), profile_, | 1772 std::vector<Profile*> last_opened_profiles = |
| 1773 &result_code)) { | 1773 g_browser_process->profile_manager()->GetLastOpenedProfiles(); |
| 1774 if (browser_init_->Start(parsed_command_line(), FilePath(), |
| 1775 profile_, last_opened_profiles, &result_code)) { |
| 1774 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) | 1776 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 1775 // Initialize autoupdate timer. Timer callback costs basically nothing | 1777 // Initialize autoupdate timer. Timer callback costs basically nothing |
| 1776 // when browser is not in persistent mode, so it's OK to let it ride on | 1778 // when browser is not in persistent mode, so it's OK to let it ride on |
| 1777 // the main thread. This needs to be done here because we don't want | 1779 // the main thread. This needs to be done here because we don't want |
| 1778 // to start the timer when Chrome is run inside a test harness. | 1780 // to start the timer when Chrome is run inside a test harness. |
| 1779 browser_process_->StartAutoupdateTimer(); | 1781 browser_process_->StartAutoupdateTimer(); |
| 1780 #endif | 1782 #endif |
| 1781 | 1783 |
| 1782 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 1784 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 1783 // On Linux, the running exe will be updated if an upgrade becomes | 1785 // On Linux, the running exe will be updated if an upgrade becomes |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1986 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1988 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1987 uma_name += "_XP"; | 1989 uma_name += "_XP"; |
| 1988 | 1990 |
| 1989 uma_name += "_PreRead"; | 1991 uma_name += "_PreRead"; |
| 1990 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 1992 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 1991 AddPreReadHistogramTime(uma_name.c_str(), time); | 1993 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1992 } | 1994 } |
| 1993 #endif | 1995 #endif |
| 1994 #endif | 1996 #endif |
| 1995 } | 1997 } |
| OLD | NEW |