OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 8 |
9 #include "app/hi_res_timer_manager.h" | 9 #include "app/hi_res_timer_manager.h" |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 if (command_line.HasSwitch(switches::kBrowserCrashTest)) { | 150 if (command_line.HasSwitch(switches::kBrowserCrashTest)) { |
151 int* bad_pointer = NULL; | 151 int* bad_pointer = NULL; |
152 *bad_pointer = 0; | 152 *bad_pointer = 0; |
153 } | 153 } |
154 | 154 |
155 #if defined(OS_CHROMEOS) | 155 #if defined(OS_CHROMEOS) |
156 // Test loading libcros and exit. We return 0 if the library could be loaded, | 156 // Test loading libcros and exit. We return 0 if the library could be loaded, |
157 // and 1 if it can't be. This is for validation that the library is installed | 157 // and 1 if it can't be. This is for validation that the library is installed |
158 // and versioned properly for Chrome to find. | 158 // and versioned properly for Chrome to find. |
159 if (command_line.HasSwitch(switches::kTestLoadLibcros)) | 159 if (command_line.HasSwitch(switches::kTestLoadLibcros)) |
160 exit(!chromeos::CrosLibrary::EnsureLoaded()); | 160 exit(!chromeos::CrosLibrary::Get()->EnsureLoaded()); |
161 #endif | 161 #endif |
162 } | 162 } |
163 | 163 |
164 void RunUIMessageLoop(BrowserProcess* browser_process) { | 164 void RunUIMessageLoop(BrowserProcess* browser_process) { |
165 #if defined(TOOLKIT_VIEWS) | 165 #if defined(TOOLKIT_VIEWS) |
166 views::AcceleratorHandler accelerator_handler; | 166 views::AcceleratorHandler accelerator_handler; |
167 MessageLoopForUI::current()->Run(&accelerator_handler); | 167 MessageLoopForUI::current()->Run(&accelerator_handler); |
168 #elif defined(USE_X11) | 168 #elif defined(USE_X11) |
169 MessageLoopForUI::current()->Run(NULL); | 169 MessageLoopForUI::current()->Run(NULL); |
170 #elif defined(OS_POSIX) | 170 #elif defined(OS_POSIX) |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 if (metrics) | 1061 if (metrics) |
1062 metrics->Stop(); | 1062 metrics->Stop(); |
1063 | 1063 |
1064 // browser_shutdown takes care of deleting browser_process, so we need to | 1064 // browser_shutdown takes care of deleting browser_process, so we need to |
1065 // release it. | 1065 // release it. |
1066 browser_process.release(); | 1066 browser_process.release(); |
1067 browser_shutdown::Shutdown(); | 1067 browser_shutdown::Shutdown(); |
1068 | 1068 |
1069 return result_code; | 1069 return result_code; |
1070 } | 1070 } |
OLD | NEW |