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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(OS_POSIX) && !defined(OS_MACOSX) |
66 #include "chrome/app/nacl_fork_delegate_linux.h" | 66 #include "chrome/app/nacl_fork_delegate_linux.h" |
67 #endif | 67 #endif |
68 | 68 |
69 #if defined(OS_CHROMEOS) | 69 #if defined(OS_CHROMEOS) |
70 #include "base/sys_info.h" | 70 #include "base/sys_info.h" |
71 #include "chrome/browser/chromeos/boot_times_loader.h" | 71 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 72 #include "chromeos/chromeos_paths.h" |
72 #endif | 73 #endif |
73 | 74 |
74 #if defined(OS_ANDROID) | 75 #if defined(OS_ANDROID) |
75 #include "chrome/common/descriptors_android.h" | 76 #include "chrome/common/descriptors_android.h" |
76 #endif | 77 #endif |
77 | 78 |
78 #if defined(USE_X11) | 79 #if defined(USE_X11) |
79 #include <stdlib.h> | 80 #include <stdlib.h> |
80 #include <string.h> | 81 #include <string.h> |
81 #include "ui/base/x/x11_util.h" | 82 #include "ui/base/x/x11_util.h" |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 InitCrashProcessInfo(); | 464 InitCrashProcessInfo(); |
464 } | 465 } |
465 #endif // defined(OS_MACOSX) | 466 #endif // defined(OS_MACOSX) |
466 | 467 |
467 void ChromeMainDelegate::PreSandboxStartup() { | 468 void ChromeMainDelegate::PreSandboxStartup() { |
468 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 469 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
469 std::string process_type = | 470 std::string process_type = |
470 command_line.GetSwitchValueASCII(switches::kProcessType); | 471 command_line.GetSwitchValueASCII(switches::kProcessType); |
471 | 472 |
472 chrome::RegisterPathProvider(); | 473 chrome::RegisterPathProvider(); |
| 474 #if defined(OS_CHROMEOS) |
| 475 chromeos::RegisterPathProvider(); |
| 476 #endif |
473 | 477 |
474 #if defined(OS_MACOSX) | 478 #if defined(OS_MACOSX) |
475 // On the Mac, the child executable lives at a predefined location within | 479 // On the Mac, the child executable lives at a predefined location within |
476 // the app bundle's versioned directory. | 480 // the app bundle's versioned directory. |
477 PathService::Override(content::CHILD_PROCESS_EXE, | 481 PathService::Override(content::CHILD_PROCESS_EXE, |
478 chrome::GetVersionedDirectory(). | 482 chrome::GetVersionedDirectory(). |
479 Append(chrome::kHelperProcessExecutablePath)); | 483 Append(chrome::kHelperProcessExecutablePath)); |
480 | 484 |
481 InitMacCrashReporter(command_line, process_type); | 485 InitMacCrashReporter(command_line, process_type); |
482 #endif | 486 #endif |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 | 710 |
707 content::ContentRendererClient* | 711 content::ContentRendererClient* |
708 ChromeMainDelegate::CreateContentRendererClient() { | 712 ChromeMainDelegate::CreateContentRendererClient() { |
709 return &g_chrome_content_renderer_client.Get(); | 713 return &g_chrome_content_renderer_client.Get(); |
710 } | 714 } |
711 | 715 |
712 content::ContentUtilityClient* | 716 content::ContentUtilityClient* |
713 ChromeMainDelegate::CreateContentUtilityClient() { | 717 ChromeMainDelegate::CreateContentUtilityClient() { |
714 return &g_chrome_content_utility_client.Get(); | 718 return &g_chrome_content_utility_client.Get(); |
715 } | 719 } |
OLD | NEW |