| 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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 resources_pack_path, ui::SCALE_FACTOR_NONE); | 629 resources_pack_path, ui::SCALE_FACTOR_NONE); |
| 630 #endif | 630 #endif |
| 631 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << | 631 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << |
| 632 locale; | 632 locale; |
| 633 | 633 |
| 634 #if defined(OS_MACOSX) | 634 #if defined(OS_MACOSX) |
| 635 // Update the process name (need resources to get the strings, so | 635 // Update the process name (need resources to get the strings, so |
| 636 // only do this when ResourcesBundle has been initialized). | 636 // only do this when ResourcesBundle has been initialized). |
| 637 SetMacProcessName(command_line); | 637 SetMacProcessName(command_line); |
| 638 #endif // defined(OS_MACOSX) | 638 #endif // defined(OS_MACOSX) |
| 639 |
| 640 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) |
| 641 if (process_type == switches::kUtilityProcess) |
| 642 chrome::ChromeContentUtilityClient::PreSandboxStartup(); |
| 643 #endif |
| 639 } | 644 } |
| 640 | 645 |
| 641 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 646 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 642 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain | 647 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain |
| 643 // sets this up for the browser process in a different manner. Zygotes | 648 // sets this up for the browser process in a different manner. Zygotes |
| 644 // need to call InitCrashReporter() in RunZygote(). | 649 // need to call InitCrashReporter() in RunZygote(). |
| 645 if (!process_type.empty() && process_type != switches::kZygoteProcess) { | 650 if (!process_type.empty() && process_type != switches::kZygoteProcess) { |
| 646 #if defined(OS_ANDROID) | 651 #if defined(OS_ANDROID) |
| 647 InitNonBrowserCrashReporterForAndroid(); | 652 InitNonBrowserCrashReporterForAndroid(); |
| 648 #else | 653 #else |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 } | 788 } |
| 784 | 789 |
| 785 content::ContentUtilityClient* | 790 content::ContentUtilityClient* |
| 786 ChromeMainDelegate::CreateContentUtilityClient() { | 791 ChromeMainDelegate::CreateContentUtilityClient() { |
| 787 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 792 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
| 788 return NULL; | 793 return NULL; |
| 789 #else | 794 #else |
| 790 return &g_chrome_content_utility_client.Get(); | 795 return &g_chrome_content_utility_client.Get(); |
| 791 #endif | 796 #endif |
| 792 } | 797 } |
| OLD | NEW |