Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(921)

Side by Side Diff: content/browser/plugin_loader_posix.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "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/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Check if the list is empty or all plugins have already been loaded before 97 // Check if the list is empty or all plugins have already been loaded before
98 // forking. 98 // forking.
99 if (MaybeRunPendingCallbacks()) 99 if (MaybeRunPendingCallbacks())
100 return; 100 return;
101 101
102 if (load_start_time_.is_null()) 102 if (load_start_time_.is_null())
103 load_start_time_ = base::TimeTicks::Now(); 103 load_start_time_ = base::TimeTicks::Now();
104 104
105 UtilityProcessHostImpl* host = new UtilityProcessHostImpl( 105 UtilityProcessHostImpl* host = new UtilityProcessHostImpl(
106 this, 106 this,
107 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 107 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get());
108 process_host_ = host->AsWeakPtr(); 108 process_host_ = host->AsWeakPtr();
109 process_host_->DisableSandbox(); 109 process_host_->DisableSandbox();
110 #if defined(OS_MACOSX) 110 #if defined(OS_MACOSX)
111 host->set_child_flags(ChildProcessHost::CHILD_ALLOW_HEAP_EXECUTION); 111 host->set_child_flags(ChildProcessHost::CHILD_ALLOW_HEAP_EXECUTION);
112 #endif 112 #endif
113 113
114 process_host_->Send(new UtilityMsg_LoadPlugins(canonical_list_)); 114 process_host_->Send(new UtilityMsg_LoadPlugins(canonical_list_));
115 } 115 }
116 116
117 void PluginLoaderPosix::OnPluginLoaded(uint32 index, 117 void PluginLoaderPosix::OnPluginLoaded(uint32 index,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 scoped_refptr<base::MessageLoopProxy> loop, 193 scoped_refptr<base::MessageLoopProxy> loop,
194 const PluginService::GetPluginsCallback& cb) 194 const PluginService::GetPluginsCallback& cb)
195 : target_loop(loop), 195 : target_loop(loop),
196 callback(cb) { 196 callback(cb) {
197 } 197 }
198 198
199 PluginLoaderPosix::PendingCallback::~PendingCallback() { 199 PluginLoaderPosix::PendingCallback::~PendingCallback() {
200 } 200 }
201 201
202 } // namespace content 202 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698