| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "net/disk_cache/simple/simple_backend_impl.h" | 5 #include "net/disk_cache/simple/simple_backend_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstdlib> | 8 #include <cstdlib> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "net/disk_cache/simple/simple_index_file.h" | 26 #include "net/disk_cache/simple/simple_index_file.h" |
| 27 #include "net/disk_cache/simple/simple_synchronous_entry.h" | 27 #include "net/disk_cache/simple/simple_synchronous_entry.h" |
| 28 #include "net/disk_cache/simple/simple_util.h" | 28 #include "net/disk_cache/simple/simple_util.h" |
| 29 | 29 |
| 30 using base::Closure; | 30 using base::Closure; |
| 31 using base::FilePath; | 31 using base::FilePath; |
| 32 using base::MessageLoopProxy; | 32 using base::MessageLoopProxy; |
| 33 using base::SequencedWorkerPool; | 33 using base::SequencedWorkerPool; |
| 34 using base::SingleThreadTaskRunner; | 34 using base::SingleThreadTaskRunner; |
| 35 using base::Time; | 35 using base::Time; |
| 36 using file_util::DirectoryExists; | 36 using base::DirectoryExists; |
| 37 using file_util::CreateDirectory; | 37 using file_util::CreateDirectory; |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 // Maximum number of concurrent worker pool threads, which also is the limit | 41 // Maximum number of concurrent worker pool threads, which also is the limit |
| 42 // on concurrent IO (as we use one thread per IO request). | 42 // on concurrent IO (as we use one thread per IO request). |
| 43 const int kDefaultMaxWorkerThreads = 50; | 43 const int kDefaultMaxWorkerThreads = 50; |
| 44 | 44 |
| 45 const char kThreadNamePrefix[] = "SimpleCacheWorker"; | 45 const char kThreadNamePrefix[] = "SimpleCacheWorker"; |
| 46 | 46 |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 const CompletionCallback& callback, | 523 const CompletionCallback& callback, |
| 524 int error_code) { | 524 int error_code) { |
| 525 if (error_code == net::ERR_FAILED) { | 525 if (error_code == net::ERR_FAILED) { |
| 526 OpenNextEntry(iter, entry, callback); | 526 OpenNextEntry(iter, entry, callback); |
| 527 return; | 527 return; |
| 528 } | 528 } |
| 529 CallCompletionCallback(callback, error_code); | 529 CallCompletionCallback(callback, error_code); |
| 530 } | 530 } |
| 531 | 531 |
| 532 } // namespace disk_cache | 532 } // namespace disk_cache |
| OLD | NEW |