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

Side by Side Diff: storage/browser/fileapi/file_system_usage_cache.cc

Issue 1139323003: Discard duplicate includes of files from storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
OLDNEW
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 "storage/browser/fileapi/file_system_usage_cache.h" 5 #include "storage/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/bind.h"
10 #include "base/files/file_path.h"
11 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
12 #include "base/pickle.h" 11 #include "base/pickle.h"
13 #include "base/stl_util.h" 12 #include "base/stl_util.h"
14 #include "base/trace_event/trace_event.h" 13 #include "base/trace_event/trace_event.h"
15 #include "storage/browser/fileapi/timed_task_helper.h" 14 #include "storage/browser/fileapi/timed_task_helper.h"
16 15
17 namespace storage { 16 namespace storage {
18 17
19 namespace { 18 namespace {
20 const int64 kCloseDelaySeconds = 5; 19 const int64 kCloseDelaySeconds = 5;
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 return !task_runner_.get() || task_runner_->RunsTasksOnCurrentThread(); 294 return !task_runner_.get() || task_runner_->RunsTasksOnCurrentThread();
296 } 295 }
297 296
298 bool FileSystemUsageCache::HasCacheFileHandle(const base::FilePath& file_path) { 297 bool FileSystemUsageCache::HasCacheFileHandle(const base::FilePath& file_path) {
299 DCHECK(CalledOnValidThread()); 298 DCHECK(CalledOnValidThread());
300 DCHECK_LE(cache_files_.size(), kMaxHandleCacheSize); 299 DCHECK_LE(cache_files_.size(), kMaxHandleCacheSize);
301 return ContainsKey(cache_files_, file_path); 300 return ContainsKey(cache_files_, file_path);
302 } 301 }
303 302
304 } // namespace storage 303 } // namespace storage
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698