Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 2065103002: Removes downgrade browser test hack and verifies renamed user data dir. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cr Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/downgrade/user_data_downgrade.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 // main message loop. 1767 // main message loop.
1768 std::vector<Profile*> last_opened_profiles; 1768 std::vector<Profile*> last_opened_profiles;
1769 #if !defined(OS_CHROMEOS) 1769 #if !defined(OS_CHROMEOS)
1770 // On ChromeOS multiple profiles doesn't apply, and will break if we load 1770 // On ChromeOS multiple profiles doesn't apply, and will break if we load
1771 // them this early as the cryptohome hasn't yet been mounted (which happens 1771 // them this early as the cryptohome hasn't yet been mounted (which happens
1772 // only once we log in). 1772 // only once we log in).
1773 last_opened_profiles = 1773 last_opened_profiles =
1774 g_browser_process->profile_manager()->GetLastOpenedProfiles(); 1774 g_browser_process->profile_manager()->GetLastOpenedProfiles();
1775 #endif // defined(OS_CHROMEOS) 1775 #endif // defined(OS_CHROMEOS)
1776 1776
1777 #if defined(OS_WIN)
1778 // Clean up old user data directory and disk cache directory.
1779 downgrade::DeleteMovedUserDataSoon();
1780 #endif
1781
1782 UMA_HISTOGRAM_TIMES("Startup.PreMainMessageLoopRunImplStep2Time", 1777 UMA_HISTOGRAM_TIMES("Startup.PreMainMessageLoopRunImplStep2Time",
1783 base::TimeTicks::Now() - start_time_step2); 1778 base::TimeTicks::Now() - start_time_step2);
1784 1779
1785 // This step is costly and is already measured in 1780 // This step is costly and is already measured in
1786 // Startup.StartupBrowserCreator_Start. 1781 // Startup.StartupBrowserCreator_Start.
1787 const bool started = browser_creator_->Start( 1782 const bool started = browser_creator_->Start(
1788 parsed_command_line(), base::FilePath(), profile_, last_opened_profiles); 1783 parsed_command_line(), base::FilePath(), profile_, last_opened_profiles);
1789 const base::TimeTicks start_time_step3 = base::TimeTicks::Now(); 1784 const base::TimeTicks start_time_step3 = base::TimeTicks::Now();
1790 if (started) { 1785 if (started) {
1791 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) 1786 #if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1842 process_power_collector_->Initialize(); 1837 process_power_collector_->Initialize();
1843 #endif // !defined(OS_ANDROID) 1838 #endif // !defined(OS_ANDROID)
1844 1839
1845 PostBrowserStart(); 1840 PostBrowserStart();
1846 1841
1847 if (parameters().ui_task) { 1842 if (parameters().ui_task) {
1848 parameters().ui_task->Run(); 1843 parameters().ui_task->Run();
1849 delete parameters().ui_task; 1844 delete parameters().ui_task;
1850 run_message_loop_ = false; 1845 run_message_loop_ = false;
1851 } 1846 }
1847
1848 #if defined(OS_WIN)
1849 // Clean up old user data directory and disk cache directory.
1850 downgrade::DeleteMovedUserDataSoon();
1851 #endif
1852
1852 #if defined(OS_ANDROID) 1853 #if defined(OS_ANDROID)
1853 // We never run the C++ main loop on Android, since the UI thread message 1854 // We never run the C++ main loop on Android, since the UI thread message
1854 // loop is controlled by the OS, so this is as close as we can get to 1855 // loop is controlled by the OS, so this is as close as we can get to
1855 // the start of the main loop. 1856 // the start of the main loop.
1856 if (result_code_ <= 0) { 1857 if (result_code_ <= 0) {
1857 RecordBrowserStartupTime(); 1858 RecordBrowserStartupTime();
1858 } 1859 }
1859 #endif // defined(OS_ANDROID) 1860 #endif // defined(OS_ANDROID)
1860 1861
1861 #if !defined(OS_ANDROID) 1862 #if !defined(OS_ANDROID)
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 chromeos::CrosSettings::Shutdown(); 1990 chromeos::CrosSettings::Shutdown();
1990 #endif // defined(OS_CHROMEOS) 1991 #endif // defined(OS_CHROMEOS)
1991 #endif // defined(OS_ANDROID) 1992 #endif // defined(OS_ANDROID)
1992 } 1993 }
1993 1994
1994 // Public members: 1995 // Public members:
1995 1996
1996 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1997 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1997 chrome_extra_parts_.push_back(parts); 1998 chrome_extra_parts_.push_back(parts);
1998 } 1999 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/downgrade/user_data_downgrade.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698