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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 } | 483 } |
484 #endif | 484 #endif |
485 | 485 |
486 #if defined(OS_MACOSX) | 486 #if defined(OS_MACOSX) |
487 // Give the browser process a longer treadmill, since crashes | 487 // Give the browser process a longer treadmill, since crashes |
488 // there have more impact. | 488 // there have more impact. |
489 const bool is_browser = !command_line.HasSwitch(switches::kProcessType); | 489 const bool is_browser = !command_line.HasSwitch(switches::kProcessType); |
490 ObjcEvilDoers::ZombieEnable(true, is_browser ? 10000 : 1000); | 490 ObjcEvilDoers::ZombieEnable(true, is_browser ? 10000 : 1000); |
491 | 491 |
492 SetUpBundleOverrides(); | 492 SetUpBundleOverrides(); |
493 chrome::common::mac::EnableCFBundleBlocker(); | 493 |
| 494 // Only enable the CFBundleBlocker in the browser. In child processes, |
| 495 // the sandbox will block access to loadable bundle locations. |
| 496 if (is_browser) |
| 497 chrome::common::mac::EnableCFBundleBlocker(); |
494 #endif | 498 #endif |
495 | 499 |
496 Profiling::ProcessStarted(); | 500 Profiling::ProcessStarted(); |
497 | 501 |
498 base::trace_event::TraceLog::GetInstance()->SetArgumentFilterPredicate( | 502 base::trace_event::TraceLog::GetInstance()->SetArgumentFilterPredicate( |
499 base::Bind(&IsTraceEventArgsWhitelisted)); | 503 base::Bind(&IsTraceEventArgsWhitelisted)); |
500 | 504 |
501 #if defined(OS_WIN) | 505 #if defined(OS_WIN) |
502 v8_breakpad_support::SetUp(); | 506 v8_breakpad_support::SetUp(); |
503 #endif | 507 #endif |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 case version_info::Channel::CANARY: | 1042 case version_info::Channel::CANARY: |
1039 return true; | 1043 return true; |
1040 case version_info::Channel::DEV: | 1044 case version_info::Channel::DEV: |
1041 case version_info::Channel::BETA: | 1045 case version_info::Channel::BETA: |
1042 case version_info::Channel::STABLE: | 1046 case version_info::Channel::STABLE: |
1043 default: | 1047 default: |
1044 // Don't enable instrumentation. | 1048 // Don't enable instrumentation. |
1045 return false; | 1049 return false; |
1046 } | 1050 } |
1047 } | 1051 } |
OLD | NEW |