| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "content/public/common/content_constants.h" | 50 #include "content/public/common/content_constants.h" |
| 51 #include "content/public/common/content_descriptor_keys.h" | 51 #include "content/public/common/content_descriptor_keys.h" |
| 52 #include "content/public/common/content_features.h" | 52 #include "content/public/common/content_features.h" |
| 53 #include "content/public/common/content_paths.h" | 53 #include "content/public/common/content_paths.h" |
| 54 #include "content/public/common/content_switches.h" | 54 #include "content/public/common/content_switches.h" |
| 55 #include "content/public/common/main_function_params.h" | 55 #include "content/public/common/main_function_params.h" |
| 56 #include "content/public/common/sandbox_init.h" | 56 #include "content/public/common/sandbox_init.h" |
| 57 #include "ipc/ipc_descriptors.h" | 57 #include "ipc/ipc_descriptors.h" |
| 58 #include "media/base/media.h" | 58 #include "media/base/media.h" |
| 59 #include "ppapi/features/features.h" | 59 #include "ppapi/features/features.h" |
| 60 #include "services/service_manager/embedder/switches.h" |
| 60 #include "ui/base/ui_base_paths.h" | 61 #include "ui/base/ui_base_paths.h" |
| 61 #include "ui/base/ui_base_switches.h" | 62 #include "ui/base/ui_base_switches.h" |
| 62 | 63 |
| 63 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) && \ | 64 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) && \ |
| 64 !defined(CHROME_MULTIPLE_DLL_BROWSER) | 65 !defined(CHROME_MULTIPLE_DLL_BROWSER) |
| 65 #include "gin/v8_initializer.h" | 66 #include "gin/v8_initializer.h" |
| 66 #endif | 67 #endif |
| 67 | 68 |
| 68 #if defined(OS_WIN) | 69 #if defined(OS_WIN) |
| 69 #include <malloc.h> | 70 #include <malloc.h> |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 #if defined(OS_WIN) | 628 #if defined(OS_WIN) |
| 628 bool should_enable_stack_dump = !process_type.empty(); | 629 bool should_enable_stack_dump = !process_type.empty(); |
| 629 #else | 630 #else |
| 630 bool should_enable_stack_dump = true; | 631 bool should_enable_stack_dump = true; |
| 631 #endif | 632 #endif |
| 632 // Print stack traces to stderr when crashes occur. This opens up security | 633 // Print stack traces to stderr when crashes occur. This opens up security |
| 633 // holes so it should never be enabled for official builds. This needs to | 634 // holes so it should never be enabled for official builds. This needs to |
| 634 // happen before crash reporting is initialized (which for chrome happens in | 635 // happen before crash reporting is initialized (which for chrome happens in |
| 635 // the call to PreSandboxStartup() on the delegate below), because otherwise | 636 // the call to PreSandboxStartup() on the delegate below), because otherwise |
| 636 // this would interfere with signal handlers used by crash reporting. | 637 // this would interfere with signal handlers used by crash reporting. |
| 637 if (should_enable_stack_dump && !command_line.HasSwitch( | 638 if (should_enable_stack_dump && |
| 638 switches::kDisableInProcessStackTraces)) { | 639 !command_line.HasSwitch( |
| 640 service_manager::switches::kDisableInProcessStackTraces)) { |
| 639 base::debug::EnableInProcessStackDumping(); | 641 base::debug::EnableInProcessStackDumping(); |
| 640 } | 642 } |
| 641 #endif // !defined(OFFICIAL_BUILD) | 643 #endif // !defined(OFFICIAL_BUILD) |
| 642 | 644 |
| 643 if (delegate_) | 645 if (delegate_) |
| 644 delegate_->PreSandboxStartup(); | 646 delegate_->PreSandboxStartup(); |
| 645 | 647 |
| 646 #if defined(OS_WIN) | 648 #if defined(OS_WIN) |
| 647 CHECK(InitializeSandbox(params.sandbox_info)); | 649 CHECK(InitializeSandbox(params.sandbox_info)); |
| 648 #elif defined(OS_MACOSX) | 650 #elif defined(OS_MACOSX) |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 | 761 |
| 760 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 762 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 761 }; | 763 }; |
| 762 | 764 |
| 763 // static | 765 // static |
| 764 ContentMainRunner* ContentMainRunner::Create() { | 766 ContentMainRunner* ContentMainRunner::Create() { |
| 765 return new ContentMainRunnerImpl(); | 767 return new ContentMainRunnerImpl(); |
| 766 } | 768 } |
| 767 | 769 |
| 768 } // namespace content | 770 } // namespace content |
| OLD | NEW |