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 "webkit/browser/fileapi/file_system_usage_cache.h" | 5 #include "webkit/browser/fileapi/file_system_usage_cache.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
| 9 #include "base/bind.h" |
9 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
10 #include "base/file_util.h" | 11 #include "base/file_util.h" |
11 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
12 #include "base/pickle.h" | 13 #include "base/pickle.h" |
13 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
14 #include "webkit/browser/fileapi/timed_task_helper.h" | 15 #include "webkit/browser/fileapi/timed_task_helper.h" |
15 | 16 |
16 namespace fileapi { | 17 namespace fileapi { |
17 | 18 |
18 namespace { | 19 namespace { |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 return !task_runner_.get() || task_runner_->RunsTasksOnCurrentThread(); | 307 return !task_runner_.get() || task_runner_->RunsTasksOnCurrentThread(); |
307 } | 308 } |
308 | 309 |
309 bool FileSystemUsageCache::HasCacheFileHandle(const base::FilePath& file_path) { | 310 bool FileSystemUsageCache::HasCacheFileHandle(const base::FilePath& file_path) { |
310 DCHECK(CalledOnValidThread()); | 311 DCHECK(CalledOnValidThread()); |
311 DCHECK_LE(cache_files_.size(), kMaxHandleCacheSize); | 312 DCHECK_LE(cache_files_.size(), kMaxHandleCacheSize); |
312 return ContainsKey(cache_files_, file_path); | 313 return ContainsKey(cache_files_, file_path); |
313 } | 314 } |
314 | 315 |
315 } // namespace fileapi | 316 } // namespace fileapi |
OLD | NEW |