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 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1961 } | 1961 } |
1962 } else { | 1962 } else { |
1963 UMA_HISTOGRAM_ENUMERATION( | 1963 UMA_HISTOGRAM_ENUMERATION( |
1964 "Chrome.SearchSelectExempt", | 1964 "Chrome.SearchSelectExempt", |
1965 search_engine_type, | 1965 search_engine_type, |
1966 SEARCH_ENGINE_MAX); | 1966 SEARCH_ENGINE_MAX); |
1967 } | 1967 } |
1968 } | 1968 } |
1969 #endif | 1969 #endif |
1970 | 1970 |
| 1971 // Some tests don't set parameters.ui_task, so they started translate |
| 1972 // language fetch that was never completed so we need to cleanup here |
| 1973 // otherwise it will be done by the destructor in a wrong thread. |
| 1974 if (parameters.ui_task == NULL && translate_manager != NULL) |
| 1975 translate_manager->CleanupPendingUlrFetcher(); |
| 1976 |
| 1977 |
1971 chrome_browser_net_websocket_experiment::WebSocketExperimentRunner::Stop(); | 1978 chrome_browser_net_websocket_experiment::WebSocketExperimentRunner::Stop(); |
1972 | 1979 |
1973 process_singleton.Cleanup(); | 1980 process_singleton.Cleanup(); |
1974 | 1981 |
1975 // Stop all tasks that might run on WatchDogThread. | 1982 // Stop all tasks that might run on WatchDogThread. |
1976 ThreadWatcherList::StopWatchingAll(); | 1983 ThreadWatcherList::StopWatchingAll(); |
1977 | 1984 |
1978 metrics->Stop(); | 1985 metrics->Stop(); |
1979 | 1986 |
1980 // browser_shutdown takes care of deleting browser_process, so we need to | 1987 // browser_shutdown takes care of deleting browser_process, so we need to |
1981 // release it. | 1988 // release it. |
1982 ignore_result(browser_process.release()); | 1989 ignore_result(browser_process.release()); |
1983 browser_shutdown::Shutdown(); | 1990 browser_shutdown::Shutdown(); |
1984 | 1991 |
1985 #if defined(OS_CHROMEOS) | 1992 #if defined(OS_CHROMEOS) |
1986 // To be precise, logout (browser shutdown) is not yet done, but the | 1993 // To be precise, logout (browser shutdown) is not yet done, but the |
1987 // remaining work is negligible, hence we say LogoutDone here. | 1994 // remaining work is negligible, hence we say LogoutDone here. |
1988 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1995 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1989 false); | 1996 false); |
1990 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1997 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1991 #endif | 1998 #endif |
1992 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 1999 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
1993 return result_code; | 2000 return result_code; |
1994 } | 2001 } |
OLD | NEW |