| 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 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 #include "net/http/http_stream_factory.h" | 93 #include "net/http/http_stream_factory.h" |
| 94 #include "net/socket/client_socket_pool_base.h" | 94 #include "net/socket/client_socket_pool_base.h" |
| 95 #include "net/spdy/spdy_session_pool.h" | 95 #include "net/spdy/spdy_session_pool.h" |
| 96 | 96 |
| 97 #if defined(USE_LINUX_BREAKPAD) | 97 #if defined(USE_LINUX_BREAKPAD) |
| 98 #include "base/linux_util.h" | 98 #include "base/linux_util.h" |
| 99 #include "chrome/app/breakpad_linux.h" | 99 #include "chrome/app/breakpad_linux.h" |
| 100 #endif | 100 #endif |
| 101 | 101 |
| 102 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 102 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 103 #include "chrome/browser/browser_main_gtk.h" |
| 103 #include "chrome/browser/gtk/gtk_util.h" | 104 #include "chrome/browser/gtk/gtk_util.h" |
| 104 #endif | 105 #endif |
| 105 | 106 |
| 106 #if defined(OS_CHROMEOS) | 107 #if defined(OS_CHROMEOS) |
| 107 #include "chrome/browser/chromeos/boot_times_loader.h" | 108 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 108 #endif | 109 #endif |
| 109 | 110 |
| 110 // TODO(port): several win-only methods have been pulled out of this, but | 111 // TODO(port): several win-only methods have been pulled out of this, but |
| 111 // BrowserMain() as a whole needs to be broken apart so that it's usable by | 112 // BrowserMain() as a whole needs to be broken apart so that it's usable by |
| 112 // other platforms. For now, it's just a stub. This is a serious work in | 113 // other platforms. For now, it's just a stub. This is a serious work in |
| (...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 // The default profile will have been changed because the ProfileManager | 1192 // The default profile will have been changed because the ProfileManager |
| 1192 // will process the notification that the UserManager sends out. | 1193 // will process the notification that the UserManager sends out. |
| 1193 | 1194 |
| 1194 logging::RedirectChromeLogging( | 1195 logging::RedirectChromeLogging( |
| 1195 user_data_dir.Append(profile_manager->GetCurrentProfileDir()), | 1196 user_data_dir.Append(profile_manager->GetCurrentProfileDir()), |
| 1196 *(CommandLine::ForCurrentProcess()), | 1197 *(CommandLine::ForCurrentProcess()), |
| 1197 logging::DELETE_OLD_LOG_FILE); | 1198 logging::DELETE_OLD_LOG_FILE); |
| 1198 } | 1199 } |
| 1199 #endif | 1200 #endif |
| 1200 | 1201 |
| 1202 #if defined(USE_X11) |
| 1203 SetBrowserX11ErrorHandlers(); |
| 1204 #endif |
| 1205 |
| 1201 Profile* profile = CreateProfile(parameters, user_data_dir); | 1206 Profile* profile = CreateProfile(parameters, user_data_dir); |
| 1202 if (!profile) | 1207 if (!profile) |
| 1203 return ResultCodes::NORMAL_EXIT; | 1208 return ResultCodes::NORMAL_EXIT; |
| 1204 | 1209 |
| 1205 // Post-profile init --------------------------------------------------------- | 1210 // Post-profile init --------------------------------------------------------- |
| 1206 | 1211 |
| 1207 PrefService* user_prefs = profile->GetPrefs(); | 1212 PrefService* user_prefs = profile->GetPrefs(); |
| 1208 DCHECK(user_prefs); | 1213 DCHECK(user_prefs); |
| 1209 | 1214 |
| 1210 // Convert active labs into switches. Modifies the current command line. | 1215 // Convert active labs into switches. Modifies the current command line. |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1521 metrics->Stop(); | 1526 metrics->Stop(); |
| 1522 | 1527 |
| 1523 // browser_shutdown takes care of deleting browser_process, so we need to | 1528 // browser_shutdown takes care of deleting browser_process, so we need to |
| 1524 // release it. | 1529 // release it. |
| 1525 ignore_result(browser_process.release()); | 1530 ignore_result(browser_process.release()); |
| 1526 browser_shutdown::Shutdown(); | 1531 browser_shutdown::Shutdown(); |
| 1527 | 1532 |
| 1528 TRACE_EVENT_END("BrowserMain", 0, 0); | 1533 TRACE_EVENT_END("BrowserMain", 0, 0); |
| 1529 return result_code; | 1534 return result_code; |
| 1530 } | 1535 } |
| OLD | NEW |