| 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 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1895 // volume on the login screen. | 1895 // volume on the login screen. |
| 1896 chromeos::SystemKeyEventListener::GetInstance(); | 1896 chromeos::SystemKeyEventListener::GetInstance(); |
| 1897 | 1897 |
| 1898 // TODO(yusukes): Remove the #if once the ARM bot (crbug.com/84694) is fixed. | 1898 // TODO(yusukes): Remove the #if once the ARM bot (crbug.com/84694) is fixed. |
| 1899 #if defined(HAVE_XINPUT2) | 1899 #if defined(HAVE_XINPUT2) |
| 1900 // Listen for XI_HierarchyChanged events. | 1900 // Listen for XI_HierarchyChanged events. |
| 1901 chromeos::XInputHierarchyChangedEventListener::GetInstance(); | 1901 chromeos::XInputHierarchyChangedEventListener::GetInstance(); |
| 1902 #endif | 1902 #endif |
| 1903 #endif | 1903 #endif |
| 1904 | 1904 |
| 1905 // Initialize extension event routers. Note that on Chrome OS, this will | |
| 1906 // not succeed if the user has not logged in yet, in which case the | |
| 1907 // event routers are initialized in LoginUtilsImpl::CompleteLogin instead. | |
| 1908 if (profile->GetExtensionService()) { | |
| 1909 // This will initialize bookmarks. Call it after bookmark import is done. | |
| 1910 // See issue 40144. | |
| 1911 profile->GetExtensionService()->InitEventRouters(); | |
| 1912 } | |
| 1913 | |
| 1914 // The extension service may be available at this point. If the command line | 1905 // The extension service may be available at this point. If the command line |
| 1915 // specifies --uninstall-extension, attempt the uninstall extension startup | 1906 // specifies --uninstall-extension, attempt the uninstall extension startup |
| 1916 // action. | 1907 // action. |
| 1917 if (parsed_command_line.HasSwitch(switches::kUninstallExtension)) { | 1908 if (parsed_command_line.HasSwitch(switches::kUninstallExtension)) { |
| 1918 ExtensionsStartupUtil ext_startup_util; | 1909 ExtensionsStartupUtil ext_startup_util; |
| 1919 if (ext_startup_util.UninstallExtension(parsed_command_line, profile)) { | 1910 if (ext_startup_util.UninstallExtension(parsed_command_line, profile)) { |
| 1920 return ResultCodes::NORMAL_EXIT; | 1911 return ResultCodes::NORMAL_EXIT; |
| 1921 } else { | 1912 } else { |
| 1922 return ResultCodes::UNINSTALL_EXTENSION_ERROR; | 1913 return ResultCodes::UNINSTALL_EXTENSION_ERROR; |
| 1923 } | 1914 } |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2094 #if defined(OS_CHROMEOS) | 2085 #if defined(OS_CHROMEOS) |
| 2095 // To be precise, logout (browser shutdown) is not yet done, but the | 2086 // To be precise, logout (browser shutdown) is not yet done, but the |
| 2096 // remaining work is negligible, hence we say LogoutDone here. | 2087 // remaining work is negligible, hence we say LogoutDone here. |
| 2097 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 2088 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 2098 false); | 2089 false); |
| 2099 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 2090 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 2100 #endif | 2091 #endif |
| 2101 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 2092 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
| 2102 return result_code; | 2093 return result_code; |
| 2103 } | 2094 } |
| OLD | NEW |