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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Check if the list is empty or all plugins have already been loaded before | 89 // Check if the list is empty or all plugins have already been loaded before |
90 // forking. | 90 // forking. |
91 if (MaybeRunPendingCallbacks()) | 91 if (MaybeRunPendingCallbacks()) |
92 return; | 92 return; |
93 | 93 |
94 if (load_start_time_.is_null()) | 94 if (load_start_time_.is_null()) |
95 load_start_time_ = base::TimeTicks::Now(); | 95 load_start_time_ = base::TimeTicks::Now(); |
96 | 96 |
97 process_host_ = new UtilityProcessHost(this, BrowserThread::IO); | 97 process_host_ = new UtilityProcessHost(this, BrowserThread::IO); |
98 process_host_->set_no_sandbox(true); | 98 process_host_->set_no_sandbox(true); |
| 99 process_host_->set_use_linux_zygote(false); |
99 #if defined(OS_MACOSX) | 100 #if defined(OS_MACOSX) |
100 process_host_->set_child_flags(ChildProcessHost::CHILD_ALLOW_HEAP_EXECUTION); | 101 process_host_->set_child_flags(ChildProcessHost::CHILD_ALLOW_HEAP_EXECUTION); |
101 #endif | 102 #endif |
102 | 103 |
103 process_host_->Send(new UtilityMsg_LoadPlugins(canonical_list_)); | 104 process_host_->Send(new UtilityMsg_LoadPlugins(canonical_list_)); |
104 } | 105 } |
105 | 106 |
106 void PluginLoaderPosix::OnPluginLoaded(uint32 index, | 107 void PluginLoaderPosix::OnPluginLoaded(uint32 index, |
107 const webkit::WebPluginInfo& plugin) { | 108 const webkit::WebPluginInfo& plugin) { |
108 if (index != next_load_index_) { | 109 if (index != next_load_index_) { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 | 171 |
171 PluginLoaderPosix::PendingCallback::PendingCallback( | 172 PluginLoaderPosix::PendingCallback::PendingCallback( |
172 scoped_refptr<base::MessageLoopProxy> loop, | 173 scoped_refptr<base::MessageLoopProxy> loop, |
173 const PluginService::GetPluginsCallback& cb) | 174 const PluginService::GetPluginsCallback& cb) |
174 : target_loop(loop), | 175 : target_loop(loop), |
175 callback(cb) { | 176 callback(cb) { |
176 } | 177 } |
177 | 178 |
178 PluginLoaderPosix::PendingCallback::~PendingCallback() { | 179 PluginLoaderPosix::PendingCallback::~PendingCallback() { |
179 } | 180 } |
OLD | NEW |