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/browser/nacl_host/nacl_file_host.h" | 5 #include "chrome/browser/nacl_host/nacl_file_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 const std::string& filename, | 62 const std::string& filename, |
63 IPC::Message* reply_msg); | 63 IPC::Message* reply_msg); |
64 | 64 |
65 void PnaclCheckDone( | 65 void PnaclCheckDone( |
66 scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter, | 66 scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter, |
67 const std::string& filename, | 67 const std::string& filename, |
68 IPC::Message* reply_msg, | 68 IPC::Message* reply_msg, |
69 bool success) { | 69 bool success) { |
70 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 70 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
71 if (!success) { | 71 if (!success) { |
72 NotifyRendererOfError(nacl_host_message_filter, reply_msg); | 72 NotifyRendererOfError(nacl_host_message_filter.get(), reply_msg); |
73 } else { | 73 } else { |
74 if (!BrowserThread::PostBlockingPoolTask( | 74 if (!BrowserThread::PostBlockingPoolTask( |
75 FROM_HERE, | 75 FROM_HERE, |
76 base::Bind(&DoOpenPnaclFile, | 76 base::Bind(&DoOpenPnaclFile, |
77 nacl_host_message_filter, | 77 nacl_host_message_filter, |
78 filename, | 78 filename, |
79 reply_msg))) { | 79 reply_msg))) { |
80 NotifyRendererOfError(nacl_host_message_filter, reply_msg); | 80 NotifyRendererOfError(nacl_host_message_filter.get(), reply_msg); |
81 } | 81 } |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 void TryInstallPnacl( | 85 void TryInstallPnacl( |
86 scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter, | 86 scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter, |
87 const std::string& filename, | 87 const std::string& filename, |
88 IPC::Message* reply_msg) { | 88 IPC::Message* reply_msg) { |
89 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 89 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
90 ComponentUpdateService* cus = g_browser_process->component_updater(); | 90 ComponentUpdateService* cus = g_browser_process->component_updater(); |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 base::Bind( | 396 base::Bind( |
397 &DoOpenNaClExecutableOnThreadPool, | 397 &DoOpenNaClExecutableOnThreadPool, |
398 nacl_host_message_filter, | 398 nacl_host_message_filter, |
399 extension_info_map, | 399 extension_info_map, |
400 file_url, reply_msg))) { | 400 file_url, reply_msg))) { |
401 NotifyRendererOfError(nacl_host_message_filter.get(), reply_msg); | 401 NotifyRendererOfError(nacl_host_message_filter.get(), reply_msg); |
402 } | 402 } |
403 } | 403 } |
404 | 404 |
405 } // namespace nacl_file_host | 405 } // namespace nacl_file_host |
OLD | NEW |