OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/plugin_loader_posix.h" | 5 #include "content/browser/plugin_loader_posix.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Check if the list is empty or all plugins have already been loaded before | 87 // Check if the list is empty or all plugins have already been loaded before |
88 // forking. | 88 // forking. |
89 if (MaybeRunPendingCallbacks()) | 89 if (MaybeRunPendingCallbacks()) |
90 return; | 90 return; |
91 | 91 |
92 if (load_start_time_.is_null()) | 92 if (load_start_time_.is_null()) |
93 load_start_time_ = base::TimeTicks::Now(); | 93 load_start_time_ = base::TimeTicks::Now(); |
94 | 94 |
95 process_host_ = new UtilityProcessHost(this, BrowserThread::IO); | 95 process_host_ = new UtilityProcessHost(this, BrowserThread::IO); |
96 process_host_->set_no_sandbox(true); | 96 process_host_->set_no_sandbox(true); |
| 97 process_host_->set_use_linux_zygote(false); |
97 #if defined(OS_MACOSX) | 98 #if defined(OS_MACOSX) |
98 process_host_->set_child_flags(ChildProcessHost::CHILD_ALLOW_HEAP_EXECUTION); | 99 process_host_->set_child_flags(ChildProcessHost::CHILD_ALLOW_HEAP_EXECUTION); |
99 #endif | 100 #endif |
100 | 101 |
101 process_host_->Send(new UtilityMsg_LoadPlugins(canonical_list_)); | 102 process_host_->Send(new UtilityMsg_LoadPlugins(canonical_list_)); |
102 } | 103 } |
103 | 104 |
104 void PluginLoaderPosix::OnPluginLoaded(uint32 index, | 105 void PluginLoaderPosix::OnPluginLoaded(uint32 index, |
105 const webkit::WebPluginInfo& plugin) { | 106 const webkit::WebPluginInfo& plugin) { |
106 if (index != next_load_index_) { | 107 if (index != next_load_index_) { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 169 |
169 PluginLoaderPosix::PendingCallback::PendingCallback( | 170 PluginLoaderPosix::PendingCallback::PendingCallback( |
170 scoped_refptr<base::MessageLoopProxy> loop, | 171 scoped_refptr<base::MessageLoopProxy> loop, |
171 const PluginService::GetPluginsCallback& cb) | 172 const PluginService::GetPluginsCallback& cb) |
172 : target_loop(loop), | 173 : target_loop(loop), |
173 callback(cb) { | 174 callback(cb) { |
174 } | 175 } |
175 | 176 |
176 PluginLoaderPosix::PendingCallback::~PendingCallback() { | 177 PluginLoaderPosix::PendingCallback::~PendingCallback() { |
177 } | 178 } |
OLD | NEW |