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

Unified Diff: net/disk_cache/simple/simple_backend_impl.cc

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/blockfile/backend_impl_v3.cc ('k') | net/dns/host_resolver_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_backend_impl.cc
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc
index 8cf592aa48dddc0a56d81a011c78966ae674a14a..6c43eeb9d6e0b439d577d1d0aff79b0dd39d5654 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -50,7 +50,7 @@ namespace {
// Maximum number of concurrent worker pool threads, which also is the limit
// on concurrent IO (as we use one thread per IO request).
-const int kDefaultMaxWorkerThreads = 50;
+const size_t kMaxWorkerThreads = 5U;
const char kThreadNamePrefix[] = "SimpleCache";
@@ -62,17 +62,8 @@ SequencedWorkerPool* g_sequenced_worker_pool = NULL;
void MaybeCreateSequencedWorkerPool() {
if (!g_sequenced_worker_pool) {
- int max_worker_threads = kDefaultMaxWorkerThreads;
-
- const std::string thread_count_field_trial =
- base::FieldTrialList::FindFullName("SimpleCacheMaxThreads");
- if (!thread_count_field_trial.empty()) {
- max_worker_threads =
- std::max(1, std::atoi(thread_count_field_trial.c_str()));
- }
-
- g_sequenced_worker_pool = new SequencedWorkerPool(max_worker_threads,
- kThreadNamePrefix);
+ g_sequenced_worker_pool =
+ new SequencedWorkerPool(kMaxWorkerThreads, kThreadNamePrefix);
g_sequenced_worker_pool->AddRef(); // Leak it.
}
}
« no previous file with comments | « net/disk_cache/blockfile/backend_impl_v3.cc ('k') | net/dns/host_resolver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698