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

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

Issue 16155009: Update webkit/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
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 "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/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 return; 292 return;
293 } 293 }
294 294
295 timer_.Start(FROM_HERE, 295 timer_.Start(FROM_HERE,
296 base::TimeDelta::FromSeconds(kCloseDelaySeconds), 296 base::TimeDelta::FromSeconds(kCloseDelaySeconds),
297 base::Bind(&FileSystemUsageCache::CloseCacheFiles, 297 base::Bind(&FileSystemUsageCache::CloseCacheFiles,
298 weak_factory_.GetWeakPtr())); 298 weak_factory_.GetWeakPtr()));
299 } 299 }
300 300
301 bool FileSystemUsageCache::CalledOnValidThread() { 301 bool FileSystemUsageCache::CalledOnValidThread() {
302 return !task_runner_ || task_runner_->RunsTasksOnCurrentThread(); 302 return !task_runner_.get() || task_runner_->RunsTasksOnCurrentThread();
303 } 303 }
304 304
305 bool FileSystemUsageCache::HasCacheFileHandle(const base::FilePath& file_path) { 305 bool FileSystemUsageCache::HasCacheFileHandle(const base::FilePath& file_path) {
306 DCHECK(CalledOnValidThread()); 306 DCHECK(CalledOnValidThread());
307 DCHECK_LE(cache_files_.size(), kMaxHandleCacheSize); 307 DCHECK_LE(cache_files_.size(), kMaxHandleCacheSize);
308 return ContainsKey(cache_files_, file_path); 308 return ContainsKey(cache_files_, file_path);
309 } 309 }
310 310
311 } // namespace fileapi 311 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/file_system_url_request_job_unittest.cc ('k') | webkit/browser/fileapi/file_writer_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698