| 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 "content/public/app/content_main_runner.h" | 5 #include "content/public/app/content_main_runner.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "base/allocator/allocator_extension.h" | 9 #include "base/allocator/allocator_extension.h" |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "content/renderer/in_process_renderer_thread.h" | 43 #include "content/renderer/in_process_renderer_thread.h" |
| 44 #include "content/utility/in_process_utility_thread.h" | 44 #include "content/utility/in_process_utility_thread.h" |
| 45 #include "crypto/nss_util.h" | 45 #include "crypto/nss_util.h" |
| 46 #include "ipc/ipc_descriptors.h" | 46 #include "ipc/ipc_descriptors.h" |
| 47 #include "ipc/ipc_switches.h" | 47 #include "ipc/ipc_switches.h" |
| 48 #include "media/base/media.h" | 48 #include "media/base/media.h" |
| 49 #include "sandbox/win/src/sandbox_types.h" | 49 #include "sandbox/win/src/sandbox_types.h" |
| 50 #include "ui/base/ui_base_paths.h" | 50 #include "ui/base/ui_base_paths.h" |
| 51 #include "ui/base/ui_base_switches.h" | 51 #include "ui/base/ui_base_switches.h" |
| 52 | 52 |
| 53 #if defined(OS_ANDROID) |
| 54 #include "content/public/common/content_descriptors.h" |
| 55 #endif |
| 56 |
| 53 #if defined(USE_TCMALLOC) | 57 #if defined(USE_TCMALLOC) |
| 54 #include "third_party/tcmalloc/chromium/src/gperftools/malloc_extension.h" | 58 #include "third_party/tcmalloc/chromium/src/gperftools/malloc_extension.h" |
| 55 #if defined(TYPE_PROFILING) | 59 #if defined(TYPE_PROFILING) |
| 56 #include "base/allocator/type_profiler.h" | 60 #include "base/allocator/type_profiler.h" |
| 57 #include "base/allocator/type_profiler_tcmalloc.h" | 61 #include "base/allocator/type_profiler_tcmalloc.h" |
| 58 #endif | 62 #endif |
| 59 #endif | 63 #endif |
| 60 | 64 |
| 61 #if !defined(OS_IOS) | 65 #if !defined(OS_IOS) |
| 62 #include "content/app/mojo/mojo_init.h" | 66 #include "content/app/mojo/mojo_init.h" |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 #endif | 700 #endif |
| 697 | 701 |
| 698 #if defined(USE_NSS) | 702 #if defined(USE_NSS) |
| 699 crypto::EarlySetupForNSSInit(); | 703 crypto::EarlySetupForNSSInit(); |
| 700 #endif | 704 #endif |
| 701 | 705 |
| 702 ui::RegisterPathProvider(); | 706 ui::RegisterPathProvider(); |
| 703 RegisterPathProvider(); | 707 RegisterPathProvider(); |
| 704 RegisterContentSchemes(true); | 708 RegisterContentSchemes(true); |
| 705 | 709 |
| 710 #if defined(OS_ANDROID) |
| 711 if (process_type.empty()) { |
| 712 // Browser process loads ICU data using file names. |
| 706 CHECK(base::i18n::InitializeICU()); | 713 CHECK(base::i18n::InitializeICU()); |
| 714 } else { |
| 715 // Render processes load ICU data using file descriptor. |
| 716 int icu_data_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( |
| 717 kAndroidICUDataDescriptor); |
| 718 CHECK(icu_data_fd != -1); |
| 719 CHECK(base::i18n::InitializeICU(icu_data_fd)); |
| 720 } |
| 721 #else |
| 722 CHECK(base::i18n::InitializeICU()); |
| 723 #endif |
| 707 | 724 |
| 708 InitializeStatsTable(command_line); | 725 InitializeStatsTable(command_line); |
| 709 | 726 |
| 710 if (delegate_) | 727 if (delegate_) |
| 711 delegate_->PreSandboxStartup(); | 728 delegate_->PreSandboxStartup(); |
| 712 | 729 |
| 713 if (!process_type.empty()) | 730 if (!process_type.empty()) |
| 714 CommonSubprocessInit(process_type); | 731 CommonSubprocessInit(process_type); |
| 715 | 732 |
| 716 #if defined(OS_WIN) | 733 #if defined(OS_WIN) |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 | 833 |
| 817 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 834 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 818 }; | 835 }; |
| 819 | 836 |
| 820 // static | 837 // static |
| 821 ContentMainRunner* ContentMainRunner::Create() { | 838 ContentMainRunner* ContentMainRunner::Create() { |
| 822 return new ContentMainRunnerImpl(); | 839 return new ContentMainRunnerImpl(); |
| 823 } | 840 } |
| 824 | 841 |
| 825 } // namespace content | 842 } // namespace content |
| OLD | NEW |