| 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/browser_main.h" | 5 #include "chrome/browser/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 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2003 // Call Recycle() here as late as possible, before going into the loop | 2003 // Call Recycle() here as late as possible, before going into the loop |
| 2004 // because Start() will add things to it while creating the main window. | 2004 // because Start() will add things to it while creating the main window. |
| 2005 if (pool) | 2005 if (pool) |
| 2006 pool->Recycle(); | 2006 pool->Recycle(); |
| 2007 | 2007 |
| 2008 UMA_HISTOGRAM_MEDIUM_TIMES("Startup.BrowserOpenTabs", | 2008 UMA_HISTOGRAM_MEDIUM_TIMES("Startup.BrowserOpenTabs", |
| 2009 base::TimeTicks::Now() - browser_open_start); | 2009 base::TimeTicks::Now() - browser_open_start); |
| 2010 | 2010 |
| 2011 // If we're running tests (ui_task is non-null), then we don't want to | 2011 // If we're running tests (ui_task is non-null), then we don't want to |
| 2012 // call FetchLanguageListFromTranslateServer | 2012 // call FetchLanguageListFromTranslateServer |
| 2013 if (parameters.ui_task == NULL && translate_manager != NULL) { | 2013 if (parameters.ui_task == NULL && translate_manager != NULL) |
| 2014 // TODO(willchan): Get rid of this after TranslateManager doesn't use | |
| 2015 // the default request context. http://crbug.com/89396. | |
| 2016 // This is necessary to force |default_request_context_| to be | |
| 2017 // initialized. | |
| 2018 profile->GetRequestContext(); | |
| 2019 translate_manager->FetchLanguageListFromTranslateServer(user_prefs); | 2014 translate_manager->FetchLanguageListFromTranslateServer(user_prefs); |
| 2020 } | |
| 2021 | 2015 |
| 2022 RunUIMessageLoop(browser_process.get()); | 2016 RunUIMessageLoop(browser_process.get()); |
| 2023 } | 2017 } |
| 2024 } | 2018 } |
| 2025 | 2019 |
| 2026 #if defined(OS_WIN) | 2020 #if defined(OS_WIN) |
| 2027 // If it's the first run, log the search engine chosen. We wait until | 2021 // If it's the first run, log the search engine chosen. We wait until |
| 2028 // shutdown because otherwise we can't be sure the user has finished | 2022 // shutdown because otherwise we can't be sure the user has finished |
| 2029 // selecting a search engine through the dialog reached from the first run | 2023 // selecting a search engine through the dialog reached from the first run |
| 2030 // bubble link. | 2024 // bubble link. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2092 #if defined(OS_CHROMEOS) | 2086 #if defined(OS_CHROMEOS) |
| 2093 // To be precise, logout (browser shutdown) is not yet done, but the | 2087 // To be precise, logout (browser shutdown) is not yet done, but the |
| 2094 // remaining work is negligible, hence we say LogoutDone here. | 2088 // remaining work is negligible, hence we say LogoutDone here. |
| 2095 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 2089 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 2096 false); | 2090 false); |
| 2097 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 2091 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 2098 #endif | 2092 #endif |
| 2099 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 2093 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
| 2100 return result_code; | 2094 return result_code; |
| 2101 } | 2095 } |
| OLD | NEW |