| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/nacl/renderer/ppb_nacl_private_impl.h" | 5 #include "components/nacl/renderer/ppb_nacl_private_impl.h" |
| 6 | 6 |
| 7 #include <numeric> | 7 #include <numeric> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 DCHECK(sender); | 326 DCHECK(sender); |
| 327 int routing_id = 0; | 327 int routing_id = 0; |
| 328 // If the nexe uses ppapi APIs, we need a routing ID. | 328 // If the nexe uses ppapi APIs, we need a routing ID. |
| 329 // To get the routing ID, we must be on the main thread. | 329 // To get the routing ID, we must be on the main thread. |
| 330 // Some nexes do not use ppapi and launch from the background thread, | 330 // Some nexes do not use ppapi and launch from the background thread, |
| 331 // so those nexes can skip finding a routing_id. | 331 // so those nexes can skip finding a routing_id. |
| 332 if (uses_ppapi) { | 332 if (uses_ppapi) { |
| 333 routing_id = GetRoutingID(instance); | 333 routing_id = GetRoutingID(instance); |
| 334 if (!routing_id) { | 334 if (!routing_id) { |
| 335 if (nexe_file_info->handle != PP_kInvalidFileHandle) { | 335 if (nexe_file_info->handle != PP_kInvalidFileHandle) { |
| 336 base::ClosePlatformFile(nexe_file_info->handle); | 336 base::File closer(nexe_file_info->handle); |
| 337 } | 337 } |
| 338 ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( | 338 ppapi::PpapiGlobals::Get()->GetMainThreadMessageLoop()->PostTask( |
| 339 FROM_HERE, | 339 FROM_HERE, |
| 340 base::Bind(callback.func, callback.user_data, | 340 base::Bind(callback.func, callback.user_data, |
| 341 static_cast<int32_t>(PP_ERROR_FAILED))); | 341 static_cast<int32_t>(PP_ERROR_FAILED))); |
| 342 return; | 342 return; |
| 343 } | 343 } |
| 344 } | 344 } |
| 345 | 345 |
| 346 InstanceInfo instance_info; | 346 InstanceInfo instance_info; |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1635 &LogTranslateTime | 1635 &LogTranslateTime |
| 1636 }; | 1636 }; |
| 1637 | 1637 |
| 1638 } // namespace | 1638 } // namespace |
| 1639 | 1639 |
| 1640 const PPB_NaCl_Private* GetNaClPrivateInterface() { | 1640 const PPB_NaCl_Private* GetNaClPrivateInterface() { |
| 1641 return &nacl_interface; | 1641 return &nacl_interface; |
| 1642 } | 1642 } |
| 1643 | 1643 |
| 1644 } // namespace nacl | 1644 } // namespace nacl |
| OLD | NEW |