diff options
-rw-r--r-- | base/base.gyp | 3 | ||||
-rw-r--r-- | base/base.gypi | 13 | ||||
-rw-r--r-- | base/worker_pool_mac.h | 33 | ||||
-rw-r--r-- | base/worker_pool_mac.mm | 218 | ||||
-rw-r--r-- | base/worker_pool_posix.cc (renamed from base/worker_pool_linux.cc) | 38 | ||||
-rw-r--r-- | base/worker_pool_posix.h (renamed from base/worker_pool_linux.h) | 52 | ||||
-rw-r--r-- | base/worker_pool_posix_unittest.cc (renamed from base/worker_pool_linux_unittest.cc) | 30 | ||||
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 10 | ||||
-rw-r--r-- | chrome/browser/ui/cocoa/keystone_glue.mm | 2 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 7 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 |
11 files changed, 48 insertions, 359 deletions
diff --git a/base/base.gyp b/base/base.gyp index 4c72e8b..562aedf 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -172,6 +172,7 @@ 'win/scoped_bstr_unittest.cc', 'win/scoped_comptr_unittest.cc', 'win/scoped_variant_unittest.cc', + 'worker_pool_posix_unittest.cc', 'worker_pool_unittest.cc', ], 'dependencies': [ @@ -185,7 +186,6 @@ ['OS == "linux" or OS == "freebsd" or OS == "openbsd" or OS == "solaris"', { 'sources!': [ 'file_version_info_unittest.cc', - 'worker_pool_linux_unittest.cc', ], 'sources': [ 'nix/xdg_util_unittest.cc', @@ -218,6 +218,7 @@ 'sources!': [ 'dir_reader_posix_unittest.cc', 'file_descriptor_shuffle_unittest.cc', + 'worker_pool_posix_unittest.cc', ], }, { # OS != "win" 'sources/': [ diff --git a/base/base.gypi b/base/base.gypi index dd9236f..543d280 100644 --- a/base/base.gypi +++ b/base/base.gypi @@ -320,10 +320,8 @@ 'win_util.cc', 'win_util.h', 'worker_pool.h', - 'worker_pool_linux.cc', - 'worker_pool_linux.h', - 'worker_pool_mac.h', - 'worker_pool_mac.mm', + 'worker_pool_posix.cc', + 'worker_pool_posix.h', 'worker_pool_win.cc', 'nix/xdg_util.h', 'nix/xdg_util.cc', @@ -360,13 +358,6 @@ ], }, ], - # Temporarily include linux implementation while debugging a - # workerpool issue. See http://crbug.com/20471 and - # http://crbug.com/60426 - [ 'OS == "mac"', { - 'sources/': [ ['include', '(^|/)worker_pool_linux\.cc$'] ], - }, - ], [ 'OS != "mac"', { 'sources!': [ 'scoped_aedesc.h' diff --git a/base/worker_pool_mac.h b/base/worker_pool_mac.h deleted file mode 100644 index 1e86891..0000000 --- a/base/worker_pool_mac.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef BASE_WORKER_POOL_MAC_H_ -#define BASE_WORKER_POOL_MAC_H_ -#pragma once - -#include "base/worker_pool.h" - -#import <Foundation/Foundation.h> - -// WorkerPoolObjC provides an Objective-C interface to the same WorkerPool -// used by the rest of the application. -@interface WorkerPoolObjC : NSObject - -// Returns the underlying NSOperationQueue back end that WorkerPool::PostTask -// would post tasks to. This can be used to add NSOperation subclasses -// directly to the same NSOperationQueue, by calling -[NSOperationQueue -// addOperation:]. Most Objective-C code wishing to dispatch tasks to the -// WorkerPool will find it handy to add an operation of type -// NSInvocationOperation. -+ (NSOperationQueue*)sharedOperationQueue; - -@end // @interface WorkerPoolObjC - -namespace worker_pool_mac { - -void SetUseLinuxWorkerPool(bool flag); - -} // namespace worker_pool_mac - -#endif // BASE_WORKER_POOL_MAC_H_ diff --git a/base/worker_pool_mac.mm b/base/worker_pool_mac.mm deleted file mode 100644 index 956cfb4..0000000 --- a/base/worker_pool_mac.mm +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/worker_pool_mac.h" - -#include "base/lazy_instance.h" -#include "base/logging.h" -#include "base/mac/scoped_nsautorelease_pool.h" -#include "base/metrics/histogram.h" -#include "base/scoped_nsobject.h" -#include "base/scoped_ptr.h" -#include "base/task.h" -#include "base/third_party/dynamic_annotations/dynamic_annotations.h" -#include "base/worker_pool_linux.h" - -// When C++ exceptions are disabled, the C++ library defines |try| and -// |catch| so as to allow exception-expecting C++ code to build properly when -// language support for exceptions is not present. These macros interfere -// with the use of |@try| and |@catch| in Objective-C files such as this one. -// Undefine these macros here, after everything has been #included, since -// there will be no C++ uses and only Objective-C uses from this point on. -#undef try -#undef catch - -namespace { - -// |true| to use the Linux WorkerPool implementation for -// |WorkerPool::PostTask()|. -bool use_linux_workerpool_ = true; - -Lock lock_; -base::Time last_check_; // Last hung-test check. -std::vector<id> outstanding_ops_; // Outstanding operations at last check. -size_t running_ = 0; // Operations in |Run()|. -size_t outstanding_ = 0; // Operations posted but not completed. - -// We use a wrapper struct here for the NSOperationQueue so that the object -// can be released when LazyInstance calls our destructor. -struct NSOperationQueueWrapper { - NSOperationQueueWrapper() { - operation_queue.reset([[NSOperationQueue alloc] init]); - } - scoped_nsobject<NSOperationQueue> operation_queue; -}; - -static base::LazyInstance<NSOperationQueueWrapper> g_nsoperation_queue( - base::LINKER_INITIALIZED); - -} // namespace - -namespace worker_pool_mac { - -void SetUseLinuxWorkerPool(bool flag) { - use_linux_workerpool_ = flag; -} - -} // namespace worker_pool_mac - -@implementation WorkerPoolObjC - -+ (NSOperationQueue*)sharedOperationQueue { - return g_nsoperation_queue.Get().operation_queue.get(); -} - -@end // @implementation WorkerPoolObjC - -// TaskOperation adapts Task->Run() for use in an NSOperationQueue. -@interface TaskOperation : NSOperation { - @private - scoped_ptr<Task> task_; -} - -// Returns an autoreleased instance of TaskOperation. See -initWithTask: for -// details. -+ (id)taskOperationWithTask:(Task*)task; - -// Designated initializer. |task| is adopted as the Task* whose Run method -// this operation will call when executed. -- (id)initWithTask:(Task*)task; - -@end // @interface TaskOperation - -@implementation TaskOperation - -+ (id)taskOperationWithTask:(Task*)task { - return [[[TaskOperation alloc] initWithTask:task] autorelease]; -} - -- (id)init { - return [self initWithTask:NULL]; -} - -- (id)initWithTask:(Task*)task { - if ((self = [super init])) { - task_.reset(task); - } - return self; -} - -- (void)main { - DCHECK(task_.get()) << "-[TaskOperation main] called with no task"; - if (!task_.get()) { - return; - } - - { - AutoLock locked(lock_); - ++running_; - } - - base::mac::ScopedNSAutoreleasePool autoreleasePool; - - @try { - task_->Run(); - } @catch(NSException* exception) { - LOG(ERROR) << "-[TaskOperation main] caught an NSException: " - << [[exception description] UTF8String]; - } @catch(id exception) { - LOG(ERROR) << "-[TaskOperation main] caught an unknown exception"; - } - - task_.reset(NULL); - - { - AutoLock locked(lock_); - --running_; - --outstanding_; - } -} - -- (void)dealloc { - // Getting the task_ contents without a lock can lead to a benign data race. - // We annotate it to stay silent under ThreadSanitizer. - ANNOTATE_IGNORE_READS_BEGIN(); - DCHECK(!task_.get()) - << "-[TaskOperation dealloc] called without running task"; - ANNOTATE_IGNORE_READS_END(); - [super dealloc]; -} - -@end // @implementation TaskOperation - -bool WorkerPool::PostTask(const tracked_objects::Location& from_here, - Task* task, bool task_is_slow) { - if (use_linux_workerpool_) { - return worker_pool_mac::MacPostTaskHelper(from_here, task, task_is_slow); - } - - base::mac::ScopedNSAutoreleasePool autorelease_pool; - - // Ignore |task_is_slow|, it doesn't map directly to any tunable aspect of - // an NSOperation. - - DCHECK(task) << "WorkerPool::PostTask called with no task"; - if (!task) { - return false; - } - - task->SetBirthPlace(from_here); - - NSOperationQueue* operation_queue = [WorkerPoolObjC sharedOperationQueue]; - [operation_queue addOperation:[TaskOperation taskOperationWithTask:task]]; - - if ([operation_queue isSuspended]) { - LOG(WARNING) << "WorkerPool::PostTask freeing stuck NSOperationQueue"; - - // Nothing should ever be suspending this queue, but in case it winds up - // happening, free things up. This is a purely speculative shot in the - // dark for http://crbug.com/20471. - [operation_queue setSuspended:NO]; - } - - // Periodically calculate the set of operations which have not made - // progress and report how many there are. This should provide a - // sense of how many clients are seeing hung operations of any sort, - // and a sense of how many clients are seeing "too many" hung - // operations. - std::vector<id> hung_ops; - size_t outstanding_delta = 0; - size_t running_ops = 0; - { - const base::TimeDelta kCheckPeriod(base::TimeDelta::FromMinutes(10)); - base::Time now = base::Time::Now(); - - AutoLock locked(lock_); - ++outstanding_; - running_ops = running_; - if (last_check_.is_null() || now - last_check_ > kCheckPeriod) { - base::mac::ScopedNSAutoreleasePool autoreleasePool; - std::vector<id> ops; - for (id op in [operation_queue operations]) { - // DO NOT RETAIN. - ops.push_back(op); - } - std::sort(ops.begin(), ops.end()); - - outstanding_delta = outstanding_ - ops.size(); - - std::set_intersection(outstanding_ops_.begin(), outstanding_ops_.end(), - ops.begin(), ops.end(), - std::back_inserter(hung_ops)); - - outstanding_ops_.swap(ops); - last_check_ = now; - } - } - - // Don't report "nothing to report". - const size_t kUnaccountedOpsDelta = 10; - if (hung_ops.size() > 0 || outstanding_delta > kUnaccountedOpsDelta) { - UMA_HISTOGRAM_COUNTS_100("OSX.HungWorkers", hung_ops.size()); - UMA_HISTOGRAM_COUNTS_100("OSX.OutstandingDelta", outstanding_delta); - UMA_HISTOGRAM_COUNTS_100("OSX.RunningOps", running_ops); - } - - return true; -} diff --git a/base/worker_pool_linux.cc b/base/worker_pool_posix.cc index 8c96ca0..85e1d8e 100644 --- a/base/worker_pool_linux.cc +++ b/base/worker_pool_posix.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "base/worker_pool.h" -#include "base/worker_pool_linux.h" +#include "base/worker_pool_posix.h" #include "base/lazy_instance.h" #include "base/logging.h" @@ -28,11 +28,11 @@ class WorkerPoolImpl { bool task_is_slow); private: - scoped_refptr<base::LinuxDynamicThreadPool> pool_; + scoped_refptr<base::PosixDynamicThreadPool> pool_; }; WorkerPoolImpl::WorkerPoolImpl() - : pool_(new base::LinuxDynamicThreadPool( + : pool_(new base::PosixDynamicThreadPool( "WorkerPool", kIdleSecondsBeforeExit)) {} WorkerPoolImpl::~WorkerPoolImpl() { @@ -50,7 +50,7 @@ base::LazyInstance<WorkerPoolImpl> g_lazy_worker_pool(base::LINKER_INITIALIZED); class WorkerThread : public PlatformThread::Delegate { public: WorkerThread(const std::string& name_prefix, int idle_seconds_before_exit, - base::LinuxDynamicThreadPool* pool) + base::PosixDynamicThreadPool* pool) : name_prefix_(name_prefix), idle_seconds_before_exit_(idle_seconds_before_exit), pool_(pool) {} @@ -60,7 +60,7 @@ class WorkerThread : public PlatformThread::Delegate { private: const std::string name_prefix_; const int idle_seconds_before_exit_; - scoped_refptr<base::LinuxDynamicThreadPool> pool_; + scoped_refptr<base::PosixDynamicThreadPool> pool_; DISALLOW_COPY_AND_ASSIGN(WorkerThread); }; @@ -84,33 +84,15 @@ void WorkerThread::ThreadMain() { } // namespace -// NOTE(shess): Temporarily allow the Mac WorkerPool implementation to -// call into the linux so that it can provide a command-line flag for -// switching back and forth. After evaluating, either remove the -// ifdef, or shift this to a shared POSIX implementation. -// http://crbug.com/44392 -#if defined(OS_MACOSX) -namespace worker_pool_mac { - -bool MacPostTaskHelper(const tracked_objects::Location& from_here, - Task* task, bool task_is_slow) { - g_lazy_worker_pool.Pointer()->PostTask(from_here, task, task_is_slow); - return true; -} - -} // namespace worker_pool_mac - -#else bool WorkerPool::PostTask(const tracked_objects::Location& from_here, Task* task, bool task_is_slow) { g_lazy_worker_pool.Pointer()->PostTask(from_here, task, task_is_slow); return true; } -#endif namespace base { -LinuxDynamicThreadPool::LinuxDynamicThreadPool( +PosixDynamicThreadPool::PosixDynamicThreadPool( const std::string& name_prefix, int idle_seconds_before_exit) : name_prefix_(name_prefix), @@ -120,7 +102,7 @@ LinuxDynamicThreadPool::LinuxDynamicThreadPool( terminated_(false), num_idle_threads_cv_(NULL) {} -LinuxDynamicThreadPool::~LinuxDynamicThreadPool() { +PosixDynamicThreadPool::~PosixDynamicThreadPool() { while (!tasks_.empty()) { Task* task = tasks_.front(); tasks_.pop(); @@ -128,7 +110,7 @@ LinuxDynamicThreadPool::~LinuxDynamicThreadPool() { } } -void LinuxDynamicThreadPool::Terminate() { +void PosixDynamicThreadPool::Terminate() { { AutoLock locked(lock_); DCHECK(!terminated_) << "Thread pool is already terminated."; @@ -137,7 +119,7 @@ void LinuxDynamicThreadPool::Terminate() { tasks_available_cv_.Broadcast(); } -void LinuxDynamicThreadPool::PostTask(Task* task) { +void PosixDynamicThreadPool::PostTask(Task* task) { AutoLock locked(lock_); DCHECK(!terminated_) << "This thread pool is already terminated. Do not post new tasks."; @@ -156,7 +138,7 @@ void LinuxDynamicThreadPool::PostTask(Task* task) { } } -Task* LinuxDynamicThreadPool::WaitForTask() { +Task* PosixDynamicThreadPool::WaitForTask() { AutoLock locked(lock_); if (terminated_) diff --git a/base/worker_pool_linux.h b/base/worker_pool_posix.h index ea6bab7..73d8287 100644 --- a/base/worker_pool_linux.h +++ b/base/worker_pool_posix.h @@ -2,27 +2,27 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// The thread pool used in the Linux implementation of WorkerPool dynamically +// The thread pool used in the POSIX implementation of WorkerPool dynamically // adds threads as necessary to handle all tasks. It keeps old threads around // for a period of time to allow them to be reused. After this waiting period, // the threads exit. This thread pool uses non-joinable threads, therefore // worker threads are not joined during process shutdown. This means that // potentially long running tasks (such as DNS lookup) do not block process // shutdown, but also means that process shutdown may "leak" objects. Note that -// although LinuxDynamicThreadPool spawns the worker threads and manages the +// although PosixDynamicThreadPool spawns the worker threads and manages the // task queue, it does not own the worker threads. The worker threads ask the -// LinuxDynamicThreadPool for work and eventually clean themselves up. The -// worker threads all maintain scoped_refptrs to the LinuxDynamicThreadPool -// instance, which prevents LinuxDynamicThreadPool from disappearing before all -// worker threads exit. The owner of LinuxDynamicThreadPool should likewise -// maintain a scoped_refptr to the LinuxDynamicThreadPool instance. +// PosixDynamicThreadPool for work and eventually clean themselves up. The +// worker threads all maintain scoped_refptrs to the PosixDynamicThreadPool +// instance, which prevents PosixDynamicThreadPool from disappearing before all +// worker threads exit. The owner of PosixDynamicThreadPool should likewise +// maintain a scoped_refptr to the PosixDynamicThreadPool instance. // -// NOTE: The classes defined in this file are only meant for use by the Linux +// NOTE: The classes defined in this file are only meant for use by the POSIX // implementation of WorkerPool. No one else should be using these classes. // These symbols are exported in a header purely for testing purposes. -#ifndef BASE_WORKER_POOL_LINUX_H_ -#define BASE_WORKER_POOL_LINUX_H_ +#ifndef BASE_WORKER_POOL_POSIX_H_ +#define BASE_WORKER_POOL_POSIX_H_ #pragma once #include <queue> @@ -39,22 +39,22 @@ class Task; namespace base { -class LinuxDynamicThreadPool - : public RefCountedThreadSafe<LinuxDynamicThreadPool> { +class PosixDynamicThreadPool + : public RefCountedThreadSafe<PosixDynamicThreadPool> { public: - class LinuxDynamicThreadPoolPeer; + class PosixDynamicThreadPoolPeer; // All worker threads will share the same |name_prefix|. They will exit after // |idle_seconds_before_exit|. - LinuxDynamicThreadPool(const std::string& name_prefix, + PosixDynamicThreadPool(const std::string& name_prefix, int idle_seconds_before_exit); - ~LinuxDynamicThreadPool(); + ~PosixDynamicThreadPool(); // Indicates that the thread pool is going away. Stops handing out tasks to // worker threads. Wakes up all the idle threads to let them exit. void Terminate(); - // Adds |task| to the thread pool. LinuxDynamicThreadPool assumes ownership + // Adds |task| to the thread pool. PosixDynamicThreadPool assumes ownership // of |task|. void PostTask(Task* task); @@ -63,7 +63,7 @@ class LinuxDynamicThreadPool Task* WaitForTask(); private: - friend class LinuxDynamicThreadPoolPeer; + friend class PosixDynamicThreadPoolPeer; const std::string name_prefix_; const int idle_seconds_before_exit_; @@ -81,23 +81,9 @@ class LinuxDynamicThreadPool // NULL in non-test code. scoped_ptr<ConditionVariable> num_idle_threads_cv_; - DISALLOW_COPY_AND_ASSIGN(LinuxDynamicThreadPool); + DISALLOW_COPY_AND_ASSIGN(PosixDynamicThreadPool); }; } // namespace base -#if defined(OS_MACOSX) -namespace worker_pool_mac { - -// NOTE(shess): Helper so that Mac WorkerPool implementation can call -// into Linux implementation while determining if the implementations -// should be merged. After evaluating, either remove the ifdef, or -// shift this to a shared POSIX implementation. -// http://crbug.com/44392 -bool MacPostTaskHelper(const tracked_objects::Location& from_here, - Task* task, bool task_is_slow); - -} // namespace worker_pool_mac -#endif - -#endif // BASE_WORKER_POOL_LINUX_H_ +#endif // BASE_WORKER_POOL_POSIX_H_ diff --git a/base/worker_pool_linux_unittest.cc b/base/worker_pool_posix_unittest.cc index f98f37a..55453c8 100644 --- a/base/worker_pool_linux_unittest.cc +++ b/base/worker_pool_posix_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/worker_pool_linux.h" +#include "base/worker_pool_posix.h" #include <set> @@ -15,10 +15,10 @@ namespace base { -// Peer class to provide passthrough access to LinuxDynamicThreadPool internals. -class LinuxDynamicThreadPool::LinuxDynamicThreadPoolPeer { +// Peer class to provide passthrough access to PosixDynamicThreadPool internals. +class PosixDynamicThreadPool::PosixDynamicThreadPoolPeer { public: - explicit LinuxDynamicThreadPoolPeer(LinuxDynamicThreadPool* pool) + explicit PosixDynamicThreadPoolPeer(PosixDynamicThreadPool* pool) : pool_(pool) {} Lock* lock() { return &pool_->lock_; } @@ -35,9 +35,9 @@ class LinuxDynamicThreadPool::LinuxDynamicThreadPoolPeer { } private: - LinuxDynamicThreadPool* pool_; + PosixDynamicThreadPool* pool_; - DISALLOW_COPY_AND_ASSIGN(LinuxDynamicThreadPoolPeer); + DISALLOW_COPY_AND_ASSIGN(PosixDynamicThreadPoolPeer); }; } // namespace base @@ -120,10 +120,10 @@ class BlockingIncrementingTask : public Task { DISALLOW_COPY_AND_ASSIGN(BlockingIncrementingTask); }; -class LinuxDynamicThreadPoolTest : public testing::Test { +class PosixDynamicThreadPoolTest : public testing::Test { protected: - LinuxDynamicThreadPoolTest() - : pool_(new base::LinuxDynamicThreadPool("dynamic_pool", 60*60)), + PosixDynamicThreadPoolTest() + : pool_(new base::PosixDynamicThreadPool("dynamic_pool", 60*60)), peer_(pool_.get()), counter_(0), num_waiting_to_start_(0), @@ -165,8 +165,8 @@ class LinuxDynamicThreadPoolTest : public testing::Test { &num_waiting_to_start_cv_, &start_); } - scoped_refptr<base::LinuxDynamicThreadPool> pool_; - base::LinuxDynamicThreadPool::LinuxDynamicThreadPoolPeer peer_; + scoped_refptr<base::PosixDynamicThreadPool> pool_; + base::PosixDynamicThreadPool::PosixDynamicThreadPoolPeer peer_; Lock counter_lock_; int counter_; Lock unique_threads_lock_; @@ -177,7 +177,7 @@ class LinuxDynamicThreadPoolTest : public testing::Test { base::WaitableEvent start_; }; -TEST_F(LinuxDynamicThreadPoolTest, Basic) { +TEST_F(PosixDynamicThreadPoolTest, Basic) { EXPECT_EQ(0, peer_.num_idle_threads()); EXPECT_EQ(0U, unique_threads_.size()); EXPECT_EQ(0U, peer_.tasks().size()); @@ -193,7 +193,7 @@ TEST_F(LinuxDynamicThreadPoolTest, Basic) { EXPECT_EQ(1, counter_); } -TEST_F(LinuxDynamicThreadPoolTest, ReuseIdle) { +TEST_F(PosixDynamicThreadPoolTest, ReuseIdle) { // Add one task and wait for it to be completed. pool_->PostTask(CreateNewIncrementingTask()); @@ -212,7 +212,7 @@ TEST_F(LinuxDynamicThreadPoolTest, ReuseIdle) { EXPECT_EQ(3, counter_); } -TEST_F(LinuxDynamicThreadPoolTest, TwoActiveTasks) { +TEST_F(PosixDynamicThreadPoolTest, TwoActiveTasks) { // Add two blocking tasks. pool_->PostTask(CreateNewBlockingIncrementingTask()); pool_->PostTask(CreateNewBlockingIncrementingTask()); @@ -228,7 +228,7 @@ TEST_F(LinuxDynamicThreadPoolTest, TwoActiveTasks) { EXPECT_EQ(2, counter_); } -TEST_F(LinuxDynamicThreadPoolTest, Complex) { +TEST_F(PosixDynamicThreadPoolTest, Complex) { // Add two non blocking tasks and wait for them to finish. pool_->PostTask(CreateNewIncrementingTask()); diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index 184b196..c25cdff 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -13,7 +13,6 @@ #include "base/message_loop.h" #include "base/string_number_conversions.h" #include "base/sys_string_conversions.h" -#import "base/worker_pool_mac.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_shutdown.h" @@ -223,15 +222,6 @@ void RecordLastRunAppBundlePath() { if (parsed_command_line.HasSwitch(switches::kActivateOnLaunch)) { [NSApp activateIgnoringOtherApps:YES]; } - - // Temporary flag to revert to the old WorkerPool implementation. - // This will be removed once we either fix the Mac WorkerPool - // implementation, or completely switch to the shared (with Linux) - // implementation. - // http://crbug.com/44392 - if (parsed_command_line.HasSwitch(switches::kDisableLinuxWorkerPool)) { - worker_pool_mac::SetUseLinuxWorkerPool(false); - } } // (NSApplicationDelegate protocol) This is the Apple-approved place to override diff --git a/chrome/browser/ui/cocoa/keystone_glue.mm b/chrome/browser/ui/cocoa/keystone_glue.mm index fa9924d..b42375a 100644 --- a/chrome/browser/ui/cocoa/keystone_glue.mm +++ b/chrome/browser/ui/cocoa/keystone_glue.mm @@ -15,7 +15,6 @@ #include "base/mac_util.h" #include "base/mac/scoped_nsautorelease_pool.h" #include "base/sys_string_conversions.h" -#import "base/worker_pool_mac.h" #include "base/ref_counted.h" #include "base/task.h" #include "base/worker_pool.h" @@ -95,7 +94,6 @@ NSString* SystemBrandFilePath() { // Adaptor for scheduling an Objective-C method call on a |WorkerPool| // thread. -// TODO(shess): Move this into workerpool_mac.h? class PerformBridge : public base::RefCountedThreadSafe<PerformBridge> { public: diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 1104491..84236bb 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -1320,13 +1320,6 @@ const char kEnableExposeForTabs[] = "enable-expose-for-tabs"; // Cause the OS X sandbox write to syslog every time an access to a resource // is denied by the sandbox. const char kEnableSandboxLogging[] = "enable-sandbox-logging"; - - -// Temporary flag to revert to the old WorkerPool implementation. -// This will be removed once we either fix the Mac WorkerPool -// implementation, or completely switch to the shared (with Linux) -// implementation. -const char kDisableLinuxWorkerPool[] = "disable-linux-worker-pool"; #else // Enable Kiosk mode. const char kKioskMode[] = "kiosk"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 0eec9d3..2a3f11d35 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -383,7 +383,6 @@ extern const char kPasswordStore[]; extern const char kDisableHolePunching[]; extern const char kEnableExposeForTabs[]; extern const char kEnableSandboxLogging[]; -extern const char kDisableLinuxWorkerPool[]; #else extern const char kKioskMode[]; #endif |