Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/app/chrome_main_delegate.h" | 5 #include "chrome/app/chrome_main_delegate.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 #include <glib.h> | 81 #include <glib.h> |
| 82 #include <gtk/gtk.h> | 82 #include <gtk/gtk.h> |
| 83 #endif | 83 #endif |
| 84 | 84 |
| 85 #if defined(USE_X11) | 85 #if defined(USE_X11) |
| 86 #include <stdlib.h> | 86 #include <stdlib.h> |
| 87 #include <string.h> | 87 #include <string.h> |
| 88 #include "ui/base/x/x11_util.h" | 88 #include "ui/base/x/x11_util.h" |
| 89 #endif | 89 #endif |
| 90 | 90 |
| 91 #if defined(USE_LINUX_BREAKPAD) | 91 #if defined(USE_POSIX_BREAKPAD) |
| 92 #include "chrome/app/breakpad_linux.h" | 92 #include "chrome/app/breakpad_linux.h" |
|
Yaron
2012/04/03 23:54:20
breakpad_posix
carlosvaldivia
2012/04/04 20:52:34
Done.
| |
| 93 #endif | 93 #endif |
| 94 | 94 |
| 95 base::LazyInstance<chrome::ChromeContentBrowserClient> | 95 base::LazyInstance<chrome::ChromeContentBrowserClient> |
| 96 g_chrome_content_browser_client = LAZY_INSTANCE_INITIALIZER; | 96 g_chrome_content_browser_client = LAZY_INSTANCE_INITIALIZER; |
| 97 base::LazyInstance<chrome::ChromeContentRendererClient> | 97 base::LazyInstance<chrome::ChromeContentRendererClient> |
| 98 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; | 98 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; |
| 99 base::LazyInstance<chrome::ChromeContentUtilityClient> | 99 base::LazyInstance<chrome::ChromeContentUtilityClient> |
| 100 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; | 100 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; |
| 101 base::LazyInstance<chrome::ChromeContentPluginClient> | 101 base::LazyInstance<chrome::ChromeContentPluginClient> |
| 102 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; | 102 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 630 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << | 630 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << |
| 631 locale; | 631 locale; |
| 632 | 632 |
| 633 #if defined(OS_MACOSX) | 633 #if defined(OS_MACOSX) |
| 634 // Update the process name (need resources to get the strings, so | 634 // Update the process name (need resources to get the strings, so |
| 635 // only do this when ResourcesBundle has been initialized). | 635 // only do this when ResourcesBundle has been initialized). |
| 636 SetMacProcessName(command_line); | 636 SetMacProcessName(command_line); |
| 637 #endif // defined(OS_MACOSX) | 637 #endif // defined(OS_MACOSX) |
| 638 } | 638 } |
| 639 | 639 |
| 640 #if defined(USE_LINUX_BREAKPAD) | 640 #if defined(USE_POSIX_BREAKPAD) |
| 641 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain | 641 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain |
| 642 // sets this up for the browser process in a different manner. Zygotes | 642 // sets this up for the browser process in a different manner. Zygotes |
| 643 // need to call InitCrashReporter() in RunZygote(). | 643 // need to call InitCrashReporter() in RunZygote(). |
| 644 if (!process_type.empty() && process_type != switches::kZygoteProcess) | 644 if (!process_type.empty() && process_type != switches::kZygoteProcess) |
| 645 InitCrashReporter(); | 645 InitCrashReporter(); |
| 646 #endif | 646 #endif |
| 647 | 647 |
| 648 #if defined(OS_CHROMEOS) | 648 #if defined(OS_CHROMEOS) |
| 649 // Read and cache ChromeOS version from file, | 649 // Read and cache ChromeOS version from file, |
| 650 // to be used from inside the sandbox. | 650 // to be used from inside the sandbox. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 727 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 727 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 728 std::string process_type = | 728 std::string process_type = |
| 729 command_line.GetSwitchValueASCII(switches::kProcessType); | 729 command_line.GetSwitchValueASCII(switches::kProcessType); |
| 730 | 730 |
| 731 Profiling::ProcessStarted(); | 731 Profiling::ProcessStarted(); |
| 732 if (Profiling::BeingProfiled()) { | 732 if (Profiling::BeingProfiled()) { |
| 733 base::debug::RestartProfilingAfterFork(); | 733 base::debug::RestartProfilingAfterFork(); |
| 734 SetUpProfilingShutdownHandler(); | 734 SetUpProfilingShutdownHandler(); |
| 735 } | 735 } |
| 736 | 736 |
| 737 #if defined(USE_LINUX_BREAKPAD) | 737 #if defined(USE_POSIX_BREAKPAD) |
| 738 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets | 738 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets |
| 739 // this up for the browser process in a different manner. | 739 // this up for the browser process in a different manner. |
| 740 InitCrashReporter(); | 740 InitCrashReporter(); |
| 741 #endif | 741 #endif |
| 742 | 742 |
| 743 InitializeChromeContentClient(process_type); | 743 InitializeChromeContentClient(process_type); |
| 744 } | 744 } |
| 745 #endif // OS_MACOSX | 745 #endif // OS_MACOSX |
| OLD | NEW |