Chromium Code Reviews| Index: content/browser/browser_main_loop.cc |
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
| index 9b29b001e512ae50c1501f149c5832bc3e37f12a..c36d820f9dfcc58f788f8c2b46d2c5acaf74ef94 100644 |
| --- a/content/browser/browser_main_loop.cc |
| +++ b/content/browser/browser_main_loop.cc |
| @@ -98,6 +98,8 @@ |
| #if !defined(OS_IOS) |
| #include "content/browser/renderer_host/render_process_host_impl.h" |
| +#include "ipc/attachment_broker.h" |
| +#include "ipc/attachment_broker_privileged.h" |
| #endif |
| #if defined(OS_ANDROID) |
| @@ -117,6 +119,7 @@ |
| #include "content/browser/bootstrap_sandbox_manager_mac.h" |
| #include "content/browser/cocoa/system_hotkey_helper_mac.h" |
| #include "content/browser/compositor/browser_compositor_view_mac.h" |
| +#include "content/browser/mach_broker_mac.h" |
| #include "content/browser/theme_helper_mac.h" |
| #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" |
| #endif |
| @@ -1200,6 +1203,20 @@ int BrowserMainLoop::BrowserThreadsStarted() { |
| mojo_shell_context_.reset(new MojoShellContext); |
| #endif |
| +#if USE_ATTACHMENT_BROKER |
| + // Construct the privileged attachment broker early. This ensures that when a |
| + // test is being run in one of the single process modes, the global attachment |
| + // broker is the privileged attachment broker, rather than an unprivileged |
| + // attachment broker. |
| +#if defined(OS_MACOSX) && !defined(OS_IOS) |
| + IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded( |
|
erikchen
2016/03/16 17:33:11
It's probably the case that this can just become C
|
| + MachBroker::GetInstance()); |
| + mojo::edk::SetMachPortProviderIfNeeded(MachBroker::GetInstance()); |
| +#else |
| + IPC::AttachmentBrokerPrivileged::CreateBrokerIfNeeded(); |
| +#endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| +#endif // USE_ATTACHMENT_BROKER |
| + |
| #if !defined(OS_IOS) |
| indexed_db_thread_.reset(new base::Thread("IndexedDB")); |
| indexed_db_thread_->Start(); |