| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 } | 241 } |
| 242 #endif | 242 #endif |
| 243 | 243 |
| 244 } // namespace | 244 } // namespace |
| 245 | 245 |
| 246 // Main routine for running as the Browser process. | 246 // Main routine for running as the Browser process. |
| 247 int BrowserMain(const MainFunctionParams& parameters) { | 247 int BrowserMain(const MainFunctionParams& parameters) { |
| 248 const CommandLine& parsed_command_line = parameters.command_line_; | 248 const CommandLine& parsed_command_line = parameters.command_line_; |
| 249 base::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_; | 249 base::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_; |
| 250 | 250 |
| 251 #if defined(OS_LINUX) |
| 252 // Needs to be called after we have chrome::DIR_USER_DATA. |
| 253 InitCrashReporter(); |
| 254 #endif |
| 255 |
| 251 // WARNING: If we get a WM_ENDSESSION objects created on the stack here | 256 // WARNING: If we get a WM_ENDSESSION objects created on the stack here |
| 252 // are NOT deleted. If you need something to run during WM_ENDSESSION add it | 257 // are NOT deleted. If you need something to run during WM_ENDSESSION add it |
| 253 // to browser_shutdown::Shutdown or BrowserProcess::EndSession. | 258 // to browser_shutdown::Shutdown or BrowserProcess::EndSession. |
| 254 | 259 |
| 255 // TODO(beng, brettw): someday, break this out into sub functions with well | 260 // TODO(beng, brettw): someday, break this out into sub functions with well |
| 256 // defined roles (e.g. pre/post-profile startup, etc). | 261 // defined roles (e.g. pre/post-profile startup, etc). |
| 257 | 262 |
| 258 #ifdef TRACK_ALL_TASK_OBJECTS | 263 #ifdef TRACK_ALL_TASK_OBJECTS |
| 259 // Start tracking the creation and deletion of Task instance. | 264 // Start tracking the creation and deletion of Task instance. |
| 260 // This construction MUST be done before main_message_loop, so that it is | 265 // This construction MUST be done before main_message_loop, so that it is |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 if (metrics) | 825 if (metrics) |
| 821 metrics->Stop(); | 826 metrics->Stop(); |
| 822 | 827 |
| 823 // browser_shutdown takes care of deleting browser_process, so we need to | 828 // browser_shutdown takes care of deleting browser_process, so we need to |
| 824 // release it. | 829 // release it. |
| 825 browser_process.release(); | 830 browser_process.release(); |
| 826 browser_shutdown::Shutdown(); | 831 browser_shutdown::Shutdown(); |
| 827 | 832 |
| 828 return result_code; | 833 return result_code; |
| 829 } | 834 } |
| OLD | NEW |