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 <stddef.h> | 7 #include <stddef.h> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 #endif | 131 #endif |
132 | 132 |
133 #if defined(USE_X11) | 133 #if defined(USE_X11) |
134 #include <stdlib.h> | 134 #include <stdlib.h> |
135 #include <string.h> | 135 #include <string.h> |
136 #include "ui/base/x/x11_util.h" // nogncheck | 136 #include "ui/base/x/x11_util.h" // nogncheck |
137 #endif | 137 #endif |
138 | 138 |
139 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 139 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
140 #include "components/crash/content/app/breakpad_linux.h" | 140 #include "components/crash/content/app/breakpad_linux.h" |
| 141 #include "v8/include/v8.h" |
141 #endif | 142 #endif |
142 | 143 |
143 #if defined(OS_LINUX) | 144 #if defined(OS_LINUX) |
144 #include "base/environment.h" | 145 #include "base/environment.h" |
145 #endif | 146 #endif |
146 | 147 |
147 #if defined(OS_MACOSX) || defined(OS_WIN) | 148 #if defined(OS_MACOSX) || defined(OS_WIN) |
148 #include "chrome/browser/policy/policy_path_parser.h" | 149 #include "chrome/browser/policy/policy_path_parser.h" |
149 #include "components/crash/content/app/crashpad.h" | 150 #include "components/crash/content/app/crashpad.h" |
150 #endif | 151 #endif |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 ChildProfiling::ProcessStarted(); | 564 ChildProfiling::ProcessStarted(); |
564 #endif | 565 #endif |
565 Profiling::ProcessStarted(); | 566 Profiling::ProcessStarted(); |
566 | 567 |
567 base::trace_event::TraceLog::GetInstance()->SetArgumentFilterPredicate( | 568 base::trace_event::TraceLog::GetInstance()->SetArgumentFilterPredicate( |
568 base::Bind(&IsTraceEventArgsWhitelisted)); | 569 base::Bind(&IsTraceEventArgsWhitelisted)); |
569 | 570 |
570 #if defined(OS_WIN) && !defined(CHROME_MULTIPLE_DLL_BROWSER) | 571 #if defined(OS_WIN) && !defined(CHROME_MULTIPLE_DLL_BROWSER) |
571 v8_breakpad_support::SetUp(); | 572 v8_breakpad_support::SetUp(); |
572 #endif | 573 #endif |
| 574 #if defined(OS_LINUX) && !defined(OS_ANDROID) |
| 575 breakpad::SetFirstChanceExceptionHandler(v8::V8::TryHandleSignal); |
| 576 #endif |
573 | 577 |
574 #if defined(OS_POSIX) | 578 #if defined(OS_POSIX) |
575 if (HandleVersionSwitches(command_line)) { | 579 if (HandleVersionSwitches(command_line)) { |
576 *exit_code = 0; | 580 *exit_code = 0; |
577 return true; // Got a --version switch; exit with a success error code. | 581 return true; // Got a --version switch; exit with a success error code. |
578 } | 582 } |
579 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) | 583 #if !defined(OS_MACOSX) && !defined(OS_CHROMEOS) |
580 // This will directly exit if the user asked for help. | 584 // This will directly exit if the user asked for help. |
581 HandleHelpSwitches(command_line); | 585 HandleHelpSwitches(command_line); |
582 #endif | 586 #endif |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 | 1226 |
1223 std::unique_ptr<service_manager::Service> | 1227 std::unique_ptr<service_manager::Service> |
1224 ChromeMainDelegate::CreateEmbeddedService(const std::string& service_name) { | 1228 ChromeMainDelegate::CreateEmbeddedService(const std::string& service_name) { |
1225 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) | 1229 #if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
1226 auto mash_service = CreateEmbeddedMashService(service_name); | 1230 auto mash_service = CreateEmbeddedMashService(service_name); |
1227 if (mash_service) | 1231 if (mash_service) |
1228 return mash_service; | 1232 return mash_service; |
1229 #endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) | 1233 #endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES) |
1230 return nullptr; | 1234 return nullptr; |
1231 } | 1235 } |
OLD | NEW |