| 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 "base/threading/sequenced_worker_pool.h" | 5 #include "base/threading/sequenced_worker_pool.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "base/tracked_objects.h" | 38 #include "base/tracked_objects.h" |
| 39 #include "build/build_config.h" | 39 #include "build/build_config.h" |
| 40 | 40 |
| 41 #if defined(OS_MACOSX) | 41 #if defined(OS_MACOSX) |
| 42 #include "base/mac/scoped_nsautorelease_pool.h" | 42 #include "base/mac/scoped_nsautorelease_pool.h" |
| 43 #elif defined(OS_WIN) | 43 #elif defined(OS_WIN) |
| 44 #include "base/win/scoped_com_initializer.h" | 44 #include "base/win/scoped_com_initializer.h" |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 #if !defined(OS_NACL) | 47 #if !defined(OS_NACL) |
| 48 #include "base/metrics/histogram.h" | 48 #include "base/metrics/histogram_macros.h" |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 namespace base { | 51 namespace base { |
| 52 | 52 |
| 53 namespace { | 53 namespace { |
| 54 | 54 |
| 55 // An enum representing the state of all pools. Any given process should only | 55 // An enum representing the state of all pools. Any given process should only |
| 56 // ever transition from NONE_ACTIVE to the active states, transitions between | 56 // ever transition from NONE_ACTIVE to the active states, transitions between |
| 57 // actives states are unexpected. The REDIRECTED_TO_TASK_SCHEDULER transition | 57 // actives states are unexpected. The REDIRECTED_TO_TASK_SCHEDULER transition |
| 58 // occurs when RedirectSequencedWorkerPoolsToTaskSchedulerForProcess() is called | 58 // occurs when RedirectSequencedWorkerPoolsToTaskSchedulerForProcess() is called |
| (...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1538 void SequencedWorkerPool::Shutdown(int max_new_blocking_tasks_after_shutdown) { | 1538 void SequencedWorkerPool::Shutdown(int max_new_blocking_tasks_after_shutdown) { |
| 1539 DCHECK(constructor_task_runner_->BelongsToCurrentThread()); | 1539 DCHECK(constructor_task_runner_->BelongsToCurrentThread()); |
| 1540 inner_->Shutdown(max_new_blocking_tasks_after_shutdown); | 1540 inner_->Shutdown(max_new_blocking_tasks_after_shutdown); |
| 1541 } | 1541 } |
| 1542 | 1542 |
| 1543 bool SequencedWorkerPool::IsShutdownInProgress() { | 1543 bool SequencedWorkerPool::IsShutdownInProgress() { |
| 1544 return inner_->IsShutdownInProgress(); | 1544 return inner_->IsShutdownInProgress(); |
| 1545 } | 1545 } |
| 1546 | 1546 |
| 1547 } // namespace base | 1547 } // namespace base |
| OLD | NEW |