| OLD | NEW | 
|   1 // Copyright 2014 The Chromium Authors. All rights reserved. |   1 // Copyright 2014 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 "services/shell/runner/host/in_process_native_runner.h" |   5 #include "services/service_manager/runner/host/in_process_native_runner.h" | 
|   6  |   6  | 
|   7 #include <utility> |   7 #include <utility> | 
|   8  |   8  | 
|   9 #include "base/bind.h" |   9 #include "base/bind.h" | 
|  10 #include "base/callback_helpers.h" |  10 #include "base/callback_helpers.h" | 
|  11 #include "base/location.h" |  11 #include "base/location.h" | 
|  12 #include "base/memory/ptr_util.h" |  12 #include "base/memory/ptr_util.h" | 
|  13 #include "base/process/process.h" |  13 #include "base/process/process.h" | 
|  14 #include "base/strings/utf_string_conversions.h" |  14 #include "base/strings/utf_string_conversions.h" | 
|  15 #include "base/task_runner.h" |  15 #include "base/task_runner.h" | 
|  16 #include "base/threading/platform_thread.h" |  16 #include "base/threading/platform_thread.h" | 
|  17 #include "base/threading/thread_task_runner_handle.h" |  17 #include "base/threading/thread_task_runner_handle.h" | 
|  18 #include "mojo/public/cpp/bindings/interface_request.h" |  18 #include "mojo/public/cpp/bindings/interface_request.h" | 
|  19 #include "services/shell/runner/host/native_library_runner.h" |  19 #include "services/service_manager/runner/host/native_library_runner.h" | 
|  20 #include "services/shell/runner/host/out_of_process_native_runner.h" |  20 #include "services/service_manager/runner/host/out_of_process_native_runner.h" | 
|  21 #include "services/shell/runner/init.h" |  21 #include "services/service_manager/runner/init.h" | 
|  22  |  22  | 
|  23 namespace shell { |  23 namespace shell { | 
|  24  |  24  | 
|  25 InProcessNativeRunner::InProcessNativeRunner() : library_(nullptr) {} |  25 InProcessNativeRunner::InProcessNativeRunner() : library_(nullptr) {} | 
|  26  |  26  | 
|  27 InProcessNativeRunner::~InProcessNativeRunner() { |  27 InProcessNativeRunner::~InProcessNativeRunner() { | 
|  28   // It is important to let the thread exit before unloading the DSO (when |  28   // It is important to let the thread exit before unloading the DSO (when | 
|  29   // library_ is destructed), because the library may have registered |  29   // library_ is destructed), because the library may have registered | 
|  30   // thread-local data and destructors to run on thread termination. |  30   // thread-local data and destructors to run on thread termination. | 
|  31   if (thread_) { |  31   if (thread_) { | 
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  86     const base::FilePath& library_path) { |  86     const base::FilePath& library_path) { | 
|  87   // Executables are always run in a new process. |  87   // Executables are always run in a new process. | 
|  88   if (!library_path.MatchesExtension(FILE_PATH_LITERAL(".library"))) { |  88   if (!library_path.MatchesExtension(FILE_PATH_LITERAL(".library"))) { | 
|  89     return base::MakeUnique<OutOfProcessNativeRunner>(launch_process_runner_, |  89     return base::MakeUnique<OutOfProcessNativeRunner>(launch_process_runner_, | 
|  90                                                       nullptr); |  90                                                       nullptr); | 
|  91   } |  91   } | 
|  92   return base::WrapUnique(new InProcessNativeRunner); |  92   return base::WrapUnique(new InProcessNativeRunner); | 
|  93 } |  93 } | 
|  94  |  94  | 
|  95 }  // namespace shell |  95 }  // namespace shell | 
| OLD | NEW |