Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: content/utility/utility_thread_impl.cc

Issue 19641008: Implement ChildThread::shutdown and clear members that have refs into blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/worker/worker_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 UtilityThreadImpl::UtilityThreadImpl(const std::string& channel_name) 45 UtilityThreadImpl::UtilityThreadImpl(const std::string& channel_name)
46 : ChildThread(channel_name), 46 : ChildThread(channel_name),
47 single_process_(true) { 47 single_process_(true) {
48 Init(); 48 Init();
49 } 49 }
50 50
51 UtilityThreadImpl::~UtilityThreadImpl() { 51 UtilityThreadImpl::~UtilityThreadImpl() {
52 } 52 }
53 53
54 void UtilityThreadImpl::Shutdown() { 54 void UtilityThreadImpl::Shutdown() {
55 ChildThread::Shutdown();
56
55 if (!single_process_) 57 if (!single_process_)
56 WebKit::shutdown(); 58 WebKit::shutdown();
57 } 59 }
58 60
59 bool UtilityThreadImpl::Send(IPC::Message* msg) { 61 bool UtilityThreadImpl::Send(IPC::Message* msg) {
60 return ChildThread::Send(msg); 62 return ChildThread::Send(msg);
61 } 63 }
62 64
63 void UtilityThreadImpl::ReleaseProcessIfNeeded() { 65 void UtilityThreadImpl::ReleaseProcessIfNeeded() {
64 if (batch_mode_) 66 if (batch_mode_)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); 156 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i]));
155 else 157 else
156 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); 158 Send(new UtilityHostMsg_LoadedPlugin(i, plugin));
157 } 159 }
158 160
159 ReleaseProcessIfNeeded(); 161 ReleaseProcessIfNeeded();
160 } 162 }
161 #endif 163 #endif
162 164
163 } // namespace content 165 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/worker/worker_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698