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/worker/worker_thread.h" | 5 #include "content/worker/worker_thread.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/threading/thread_local.h" | 9 #include "base/threading/thread_local.h" |
10 #include "content/child/appcache_dispatcher.h" | 10 #include "content/child/appcache_dispatcher.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 channel()->AddFilter(indexed_db_message_filter_.get()); | 51 channel()->AddFilter(indexed_db_message_filter_.get()); |
52 | 52 |
53 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 53 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
54 SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line); | 54 SetRuntimeFeaturesDefaultsAndUpdateFromArgs(command_line); |
55 } | 55 } |
56 | 56 |
57 WorkerThread::~WorkerThread() { | 57 WorkerThread::~WorkerThread() { |
58 } | 58 } |
59 | 59 |
60 void WorkerThread::Shutdown() { | 60 void WorkerThread::Shutdown() { |
| 61 ChildThread::Shutdown(); |
| 62 |
61 // Shutdown in reverse of the initialization order. | 63 // Shutdown in reverse of the initialization order. |
62 channel()->RemoveFilter(indexed_db_message_filter_.get()); | 64 channel()->RemoveFilter(indexed_db_message_filter_.get()); |
63 indexed_db_message_filter_ = NULL; | 65 indexed_db_message_filter_ = NULL; |
64 | 66 |
65 channel()->RemoveFilter(db_message_filter_.get()); | 67 channel()->RemoveFilter(db_message_filter_.get()); |
66 db_message_filter_ = NULL; | 68 db_message_filter_ = NULL; |
67 | 69 |
68 WebKit::shutdown(); | 70 WebKit::shutdown(); |
69 lazy_tls.Pointer()->Set(NULL); | 71 lazy_tls.Pointer()->Set(NULL); |
70 } | 72 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 110 |
109 void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) { | 111 void WorkerThread::RemoveWorkerStub(WebSharedWorkerStub* stub) { |
110 worker_stubs_.erase(stub); | 112 worker_stubs_.erase(stub); |
111 } | 113 } |
112 | 114 |
113 void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) { | 115 void WorkerThread::AddWorkerStub(WebSharedWorkerStub* stub) { |
114 worker_stubs_.insert(stub); | 116 worker_stubs_.insert(stub); |
115 } | 117 } |
116 | 118 |
117 } // namespace content | 119 } // namespace content |
OLD | NEW |