| OLD | NEW | 
|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/worker/worker_thread.h" | 5 #include "chrome/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/thread_local.h" | 9 #include "base/thread_local.h" | 
| 10 #include "chrome/common/appcache/appcache_dispatcher.h" | 10 #include "chrome/common/appcache/appcache_dispatcher.h" | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 48       !command_line.HasSwitch(switches::kDisableApplicationCache)); | 48       !command_line.HasSwitch(switches::kDisableApplicationCache)); | 
| 49 | 49 | 
| 50 #if defined(OS_WIN) | 50 #if defined(OS_WIN) | 
| 51   // We don't yet support notifications on non-Windows, so hide it from pages. | 51   // We don't yet support notifications on non-Windows, so hide it from pages. | 
| 52   WebRuntimeFeatures::enableNotifications( | 52   WebRuntimeFeatures::enableNotifications( | 
| 53       !command_line.HasSwitch(switches::kDisableDesktopNotifications)); | 53       !command_line.HasSwitch(switches::kDisableDesktopNotifications)); | 
| 54 #endif | 54 #endif | 
| 55 | 55 | 
| 56   WebRuntimeFeatures::enableSockets( | 56   WebRuntimeFeatures::enableSockets( | 
| 57       !command_line.HasSwitch(switches::kDisableWebSockets)); | 57       !command_line.HasSwitch(switches::kDisableWebSockets)); | 
|  | 58 | 
|  | 59   WebRuntimeFeatures::enableFileSystem( | 
|  | 60       command_line.HasSwitch(switches::kEnableFileSystem)); | 
| 58 } | 61 } | 
| 59 | 62 | 
| 60 WorkerThread::~WorkerThread() { | 63 WorkerThread::~WorkerThread() { | 
| 61   // Shutdown in reverse of the initialization order. | 64   // Shutdown in reverse of the initialization order. | 
| 62   channel()->RemoveFilter(db_message_filter_.get()); | 65   channel()->RemoveFilter(db_message_filter_.get()); | 
| 63   db_message_filter_ = NULL; | 66   db_message_filter_ = NULL; | 
| 64 | 67 | 
| 65   WebKit::shutdown(); | 68   WebKit::shutdown(); | 
| 66   lazy_tls.Pointer()->Set(NULL); | 69   lazy_tls.Pointer()->Set(NULL); | 
| 67 } | 70 } | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 104   } | 107   } | 
| 105 } | 108 } | 
| 106 | 109 | 
| 107 void WorkerThread::RemoveWorkerStub(WebWorkerStubBase* stub) { | 110 void WorkerThread::RemoveWorkerStub(WebWorkerStubBase* stub) { | 
| 108   worker_stubs_.erase(stub); | 111   worker_stubs_.erase(stub); | 
| 109 } | 112 } | 
| 110 | 113 | 
| 111 void WorkerThread::AddWorkerStub(WebWorkerStubBase* stub) { | 114 void WorkerThread::AddWorkerStub(WebWorkerStubBase* stub) { | 
| 112   worker_stubs_.insert(stub); | 115   worker_stubs_.insert(stub); | 
| 113 } | 116 } | 
| 114 |  | 
| OLD | NEW | 
|---|