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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/metrics/stats_counters.h" | 10 #include "base/metrics/stats_counters.h" |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 624 resources_pack_path, ui::SCALE_FACTOR_NONE); | 624 resources_pack_path, ui::SCALE_FACTOR_NONE); |
| 625 #endif | 625 #endif |
| 626 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << | 626 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << |
| 627 locale; | 627 locale; |
| 628 | 628 |
| 629 #if defined(OS_MACOSX) | 629 #if defined(OS_MACOSX) |
| 630 // Update the process name (need resources to get the strings, so | 630 // Update the process name (need resources to get the strings, so |
| 631 // only do this when ResourcesBundle has been initialized). | 631 // only do this when ResourcesBundle has been initialized). |
| 632 SetMacProcessName(command_line); | 632 SetMacProcessName(command_line); |
| 633 #endif // defined(OS_MACOSX) | 633 #endif // defined(OS_MACOSX) |
| 634 | |
| 635 chrome::ChromeContentUtilityClient::PreSandboxStartup(); | |
|
Lei Zhang
2013/07/18 19:50:01
Do all process types need this, or only utility pr
Vitaly Buka (NO REVIEWS)
2013/07/18 20:42:13
Thanks.
Done.
| |
| 634 } | 636 } |
| 635 | 637 |
| 636 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 638 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 637 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain | 639 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain |
| 638 // sets this up for the browser process in a different manner. Zygotes | 640 // sets this up for the browser process in a different manner. Zygotes |
| 639 // need to call InitCrashReporter() in RunZygote(). | 641 // need to call InitCrashReporter() in RunZygote(). |
| 640 if (!process_type.empty() && process_type != switches::kZygoteProcess) { | 642 if (!process_type.empty() && process_type != switches::kZygoteProcess) { |
| 641 #if defined(OS_ANDROID) | 643 #if defined(OS_ANDROID) |
| 642 InitNonBrowserCrashReporterForAndroid(); | 644 InitNonBrowserCrashReporterForAndroid(); |
| 643 #else | 645 #else |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 762 | 764 |
| 763 content::ContentRendererClient* | 765 content::ContentRendererClient* |
| 764 ChromeMainDelegate::CreateContentRendererClient() { | 766 ChromeMainDelegate::CreateContentRendererClient() { |
| 765 return &g_chrome_content_renderer_client.Get(); | 767 return &g_chrome_content_renderer_client.Get(); |
| 766 } | 768 } |
| 767 | 769 |
| 768 content::ContentUtilityClient* | 770 content::ContentUtilityClient* |
| 769 ChromeMainDelegate::CreateContentUtilityClient() { | 771 ChromeMainDelegate::CreateContentUtilityClient() { |
| 770 return &g_chrome_content_utility_client.Get(); | 772 return &g_chrome_content_utility_client.Get(); |
| 771 } | 773 } |
| OLD | NEW |