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/stats_counters.h" | 10 #include "base/metrics/stats_counters.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 #include "chrome/common/mac/objc_zombie.h" | 55 #include "chrome/common/mac/objc_zombie.h" |
56 #include "grit/chromium_strings.h" | 56 #include "grit/chromium_strings.h" |
57 #include "ui/base/l10n/l10n_util_mac.h" | 57 #include "ui/base/l10n/l10n_util_mac.h" |
58 #endif | 58 #endif |
59 | 59 |
60 #if defined(OS_POSIX) | 60 #if defined(OS_POSIX) |
61 #include <locale.h> | 61 #include <locale.h> |
62 #include <signal.h> | 62 #include <signal.h> |
63 #endif | 63 #endif |
64 | 64 |
65 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 65 #if !defined(DISABLE_NACL) && defined(OS_LINUX) |
66 #include "chrome/app/nacl_fork_delegate_linux.h" | 66 #include "chrome/app/nacl_fork_delegate_linux.h" |
| 67 #include "chrome/common/nacl_paths.h" |
67 #endif | 68 #endif |
68 | 69 |
69 #if defined(OS_CHROMEOS) | 70 #if defined(OS_CHROMEOS) |
70 #include "base/sys_info.h" | 71 #include "base/sys_info.h" |
71 #include "chrome/browser/chromeos/boot_times_loader.h" | 72 #include "chrome/browser/chromeos/boot_times_loader.h" |
72 #include "chromeos/chromeos_paths.h" | 73 #include "chromeos/chromeos_paths.h" |
73 #endif | 74 #endif |
74 | 75 |
75 #if defined(OS_ANDROID) | 76 #if defined(OS_ANDROID) |
76 #include "chrome/common/descriptors_android.h" | 77 #include "chrome/common/descriptors_android.h" |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 | 468 |
468 void ChromeMainDelegate::PreSandboxStartup() { | 469 void ChromeMainDelegate::PreSandboxStartup() { |
469 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 470 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
470 std::string process_type = | 471 std::string process_type = |
471 command_line.GetSwitchValueASCII(switches::kProcessType); | 472 command_line.GetSwitchValueASCII(switches::kProcessType); |
472 | 473 |
473 chrome::RegisterPathProvider(); | 474 chrome::RegisterPathProvider(); |
474 #if defined(OS_CHROMEOS) | 475 #if defined(OS_CHROMEOS) |
475 chromeos::RegisterPathProvider(); | 476 chromeos::RegisterPathProvider(); |
476 #endif | 477 #endif |
| 478 #if !defined(DISABLE_NACL) && defined(OS_LINUX) |
| 479 nacl::RegisterPathProvider(); |
| 480 #endif |
477 | 481 |
478 #if defined(OS_MACOSX) | 482 #if defined(OS_MACOSX) |
479 // On the Mac, the child executable lives at a predefined location within | 483 // On the Mac, the child executable lives at a predefined location within |
480 // the app bundle's versioned directory. | 484 // the app bundle's versioned directory. |
481 PathService::Override(content::CHILD_PROCESS_EXE, | 485 PathService::Override(content::CHILD_PROCESS_EXE, |
482 chrome::GetVersionedDirectory(). | 486 chrome::GetVersionedDirectory(). |
483 Append(chrome::kHelperProcessExecutablePath)); | 487 Append(chrome::kHelperProcessExecutablePath)); |
484 | 488 |
485 InitMacCrashReporter(command_line, process_type); | 489 InitMacCrashReporter(command_line, process_type); |
486 #endif | 490 #endif |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 | 717 |
714 content::ContentRendererClient* | 718 content::ContentRendererClient* |
715 ChromeMainDelegate::CreateContentRendererClient() { | 719 ChromeMainDelegate::CreateContentRendererClient() { |
716 return &g_chrome_content_renderer_client.Get(); | 720 return &g_chrome_content_renderer_client.Get(); |
717 } | 721 } |
718 | 722 |
719 content::ContentUtilityClient* | 723 content::ContentUtilityClient* |
720 ChromeMainDelegate::CreateContentUtilityClient() { | 724 ChromeMainDelegate::CreateContentUtilityClient() { |
721 return &g_chrome_content_utility_client.Get(); | 725 return &g_chrome_content_utility_client.Get(); |
722 } | 726 } |
OLD | NEW |