| 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 "content/utility/utility_thread_impl.h" | 5 #include "content/utility/utility_thread_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "services/service_manager/public/cpp/interface_registry.h" | 22 #include "services/service_manager/public/cpp/interface_registry.h" |
| 23 #include "third_party/WebKit/public/web/WebKit.h" | 23 #include "third_party/WebKit/public/web/WebKit.h" |
| 24 | 24 |
| 25 #if defined(OS_POSIX) && BUILDFLAG(ENABLE_PLUGINS) | 25 #if defined(OS_POSIX) && BUILDFLAG(ENABLE_PLUGINS) |
| 26 #include "base/files/file_path.h" | 26 #include "base/files/file_path.h" |
| 27 #include "content/common/plugin_list.h" | 27 #include "content/common/plugin_list.h" |
| 28 #endif | 28 #endif |
| 29 | 29 |
| 30 namespace content { | 30 namespace content { |
| 31 | 31 |
| 32 namespace { | |
| 33 | |
| 34 template<typename SRC, typename DEST> | |
| 35 void ConvertVector(const SRC& src, DEST* dest) { | |
| 36 dest->reserve(src.size()); | |
| 37 for (typename SRC::const_iterator i = src.begin(); i != src.end(); ++i) | |
| 38 dest->push_back(typename DEST::value_type(*i)); | |
| 39 } | |
| 40 | |
| 41 } // namespace | |
| 42 | |
| 43 UtilityThreadImpl::UtilityThreadImpl() | 32 UtilityThreadImpl::UtilityThreadImpl() |
| 44 : ChildThreadImpl(ChildThreadImpl::Options::Builder().Build()) { | 33 : ChildThreadImpl(ChildThreadImpl::Options::Builder().Build()) { |
| 45 Init(); | 34 Init(); |
| 46 } | 35 } |
| 47 | 36 |
| 48 UtilityThreadImpl::UtilityThreadImpl(const InProcessChildThreadParams& params) | 37 UtilityThreadImpl::UtilityThreadImpl(const InProcessChildThreadParams& params) |
| 49 : ChildThreadImpl(ChildThreadImpl::Options::Builder() | 38 : ChildThreadImpl(ChildThreadImpl::Options::Builder() |
| 50 .InBrowserProcess(params) | 39 .InBrowserProcess(params) |
| 51 .Build()) { | 40 .Build()) { |
| 52 Init(); | 41 Init(); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 } | 112 } |
| 124 | 113 |
| 125 void UtilityThreadImpl::BindServiceFactoryRequest( | 114 void UtilityThreadImpl::BindServiceFactoryRequest( |
| 126 service_manager::mojom::ServiceFactoryRequest request) { | 115 service_manager::mojom::ServiceFactoryRequest request) { |
| 127 DCHECK(service_factory_); | 116 DCHECK(service_factory_); |
| 128 service_factory_bindings_.AddBinding(service_factory_.get(), | 117 service_factory_bindings_.AddBinding(service_factory_.get(), |
| 129 std::move(request)); | 118 std::move(request)); |
| 130 } | 119 } |
| 131 | 120 |
| 132 } // namespace content | 121 } // namespace content |
| OLD | NEW |