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 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 dest->push_back(typename DEST::value_type(*i)); | 33 dest->push_back(typename DEST::value_type(*i)); |
34 } | 34 } |
35 | 35 |
36 } // namespace | 36 } // namespace |
37 | 37 |
38 UtilityThreadImpl::UtilityThreadImpl() : single_process_(false) { | 38 UtilityThreadImpl::UtilityThreadImpl() : single_process_(false) { |
39 Init(); | 39 Init(); |
40 } | 40 } |
41 | 41 |
42 UtilityThreadImpl::UtilityThreadImpl(const std::string& channel_name) | 42 UtilityThreadImpl::UtilityThreadImpl(const std::string& channel_name) |
43 : ChildThreadImpl(Options(channel_name, false)), | 43 : ChildThreadImpl(Options::Builder() |
| 44 .InBrowserProcess(true) |
| 45 .WithChannelName(channel_name) |
| 46 .Build()), |
44 single_process_(true) { | 47 single_process_(true) { |
45 Init(); | 48 Init(); |
46 } | 49 } |
47 | 50 |
48 UtilityThreadImpl::~UtilityThreadImpl() { | 51 UtilityThreadImpl::~UtilityThreadImpl() { |
49 } | 52 } |
50 | 53 |
51 void UtilityThreadImpl::Shutdown() { | 54 void UtilityThreadImpl::Shutdown() { |
52 ChildThreadImpl::Shutdown(); | 55 ChildThreadImpl::Shutdown(); |
53 | 56 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); | 128 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); |
126 else | 129 else |
127 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); | 130 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); |
128 } | 131 } |
129 | 132 |
130 ReleaseProcessIfNeeded(); | 133 ReleaseProcessIfNeeded(); |
131 } | 134 } |
132 #endif | 135 #endif |
133 | 136 |
134 } // namespace content | 137 } // namespace content |
OLD | NEW |