| 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 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1867 // volume on the login screen. | 1867 // volume on the login screen. |
| 1868 chromeos::SystemKeyEventListener::GetInstance(); | 1868 chromeos::SystemKeyEventListener::GetInstance(); |
| 1869 | 1869 |
| 1870 // TODO(yusukes): Remove the #if once the ARM bot (crbug.com/84694) is fixed. | 1870 // TODO(yusukes): Remove the #if once the ARM bot (crbug.com/84694) is fixed. |
| 1871 #if defined(HAVE_XINPUT2) | 1871 #if defined(HAVE_XINPUT2) |
| 1872 // Listen for XI_HierarchyChanged events. | 1872 // Listen for XI_HierarchyChanged events. |
| 1873 chromeos::XInputHierarchyChangedEventListener::GetInstance(); | 1873 chromeos::XInputHierarchyChangedEventListener::GetInstance(); |
| 1874 #endif | 1874 #endif |
| 1875 #endif | 1875 #endif |
| 1876 | 1876 |
| 1877 // Initialize extension event routers. Note that on Chrome OS, this will | |
| 1878 // not succeed if the user has not logged in yet, in which case the | |
| 1879 // event routers are initialized in LoginUtilsImpl::CompleteLogin instead. | |
| 1880 if (profile->GetExtensionService()) { | |
| 1881 // This will initialize bookmarks. Call it after bookmark import is done. | |
| 1882 // See issue 40144. | |
| 1883 profile->GetExtensionService()->InitEventRouters(); | |
| 1884 } | |
| 1885 | |
| 1886 // The extension service may be available at this point. If the command line | 1877 // The extension service may be available at this point. If the command line |
| 1887 // specifies --uninstall-extension, attempt the uninstall extension startup | 1878 // specifies --uninstall-extension, attempt the uninstall extension startup |
| 1888 // action. | 1879 // action. |
| 1889 if (parsed_command_line.HasSwitch(switches::kUninstallExtension)) { | 1880 if (parsed_command_line.HasSwitch(switches::kUninstallExtension)) { |
| 1890 ExtensionsStartupUtil ext_startup_util; | 1881 ExtensionsStartupUtil ext_startup_util; |
| 1891 if (ext_startup_util.UninstallExtension(parsed_command_line, profile)) { | 1882 if (ext_startup_util.UninstallExtension(parsed_command_line, profile)) { |
| 1892 return ResultCodes::NORMAL_EXIT; | 1883 return ResultCodes::NORMAL_EXIT; |
| 1893 } else { | 1884 } else { |
| 1894 return ResultCodes::UNINSTALL_EXTENSION_ERROR; | 1885 return ResultCodes::UNINSTALL_EXTENSION_ERROR; |
| 1895 } | 1886 } |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2056 #if defined(OS_CHROMEOS) | 2047 #if defined(OS_CHROMEOS) |
| 2057 // To be precise, logout (browser shutdown) is not yet done, but the | 2048 // To be precise, logout (browser shutdown) is not yet done, but the |
| 2058 // remaining work is negligible, hence we say LogoutDone here. | 2049 // remaining work is negligible, hence we say LogoutDone here. |
| 2059 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 2050 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 2060 false); | 2051 false); |
| 2061 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 2052 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 2062 #endif | 2053 #endif |
| 2063 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 2054 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
| 2064 return result_code; | 2055 return result_code; |
| 2065 } | 2056 } |
| OLD | NEW |