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 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2019 upgrade_util::SaveLastModifiedTimeOfExe(); | 2019 upgrade_util::SaveLastModifiedTimeOfExe(); |
2020 #endif | 2020 #endif |
2021 | 2021 |
2022 // Record now as the last successful chrome start. | 2022 // Record now as the last successful chrome start. |
2023 GoogleUpdateSettings::SetLastRunTime(); | 2023 GoogleUpdateSettings::SetLastRunTime(); |
2024 // Call Recycle() here as late as possible, before going into the loop | 2024 // Call Recycle() here as late as possible, before going into the loop |
2025 // because Start() will add things to it while creating the main window. | 2025 // because Start() will add things to it while creating the main window. |
2026 if (pool) | 2026 if (pool) |
2027 pool->Recycle(); | 2027 pool->Recycle(); |
2028 | 2028 |
2029 UMA_HISTOGRAM_MEDIUM_TIMES("Startup.BrowserOpenTabs", | 2029 RecordPreReadExperimentTime("Startup.BrowserOpenTabs", |
2030 base::TimeTicks::Now() - browser_open_start); | 2030 base::TimeTicks::Now() - browser_open_start); |
2031 | 2031 |
2032 // TODO(mad): Move this call in a proper place on CrOS. | 2032 // TODO(mad): Move this call in a proper place on CrOS. |
2033 // http://crosbug.com/17687 | 2033 // http://crosbug.com/17687 |
2034 #if !defined(OS_CHROMEOS) | 2034 #if !defined(OS_CHROMEOS) |
2035 // If we're running tests (ui_task is non-null), then we don't want to | 2035 // If we're running tests (ui_task is non-null), then we don't want to |
2036 // call FetchLanguageListFromTranslateServer | 2036 // call FetchLanguageListFromTranslateServer |
2037 if (parameters.ui_task == NULL && translate_manager != NULL) { | 2037 if (parameters.ui_task == NULL && translate_manager != NULL) { |
2038 // TODO(willchan): Get rid of this after TranslateManager doesn't use | 2038 // TODO(willchan): Get rid of this after TranslateManager doesn't use |
2039 // the default request context. http://crbug.com/89396. | 2039 // the default request context. http://crbug.com/89396. |
2040 // This is necessary to force |default_request_context_| to be | 2040 // This is necessary to force |default_request_context_| to be |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2115 #if defined(OS_CHROMEOS) | 2115 #if defined(OS_CHROMEOS) |
2116 // To be precise, logout (browser shutdown) is not yet done, but the | 2116 // To be precise, logout (browser shutdown) is not yet done, but the |
2117 // remaining work is negligible, hence we say LogoutDone here. | 2117 // remaining work is negligible, hence we say LogoutDone here. |
2118 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 2118 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
2119 false); | 2119 false); |
2120 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 2120 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
2121 #endif | 2121 #endif |
2122 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 2122 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
2123 return result_code; | 2123 return result_code; |
2124 } | 2124 } |
OLD | NEW |