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

Side by Side Diff: content/browser/indexed_db/indexed_db_context_impl.cc

Issue 101143006: Convert base::file_util to use File instead of PlatformFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove base:: Created 6 years, 11 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 "content/browser/indexed_db/indexed_db_context_impl.h" 5 #include "content/browser/indexed_db/indexed_db_context_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 return 0; 290 return 0;
291 EnsureDiskUsageCacheInitialized(origin_url); 291 EnsureDiskUsageCacheInitialized(origin_url);
292 return origin_size_map_[origin_url]; 292 return origin_size_map_[origin_url];
293 } 293 }
294 294
295 base::Time IndexedDBContextImpl::GetOriginLastModified(const GURL& origin_url) { 295 base::Time IndexedDBContextImpl::GetOriginLastModified(const GURL& origin_url) {
296 DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); 296 DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
297 if (data_path_.empty() || !IsInOriginSet(origin_url)) 297 if (data_path_.empty() || !IsInOriginSet(origin_url))
298 return base::Time(); 298 return base::Time();
299 base::FilePath idb_directory = GetFilePath(origin_url); 299 base::FilePath idb_directory = GetFilePath(origin_url);
300 base::PlatformFileInfo file_info; 300 base::File::Info file_info;
301 if (!base::GetFileInfo(idb_directory, &file_info)) 301 if (!base::GetFileInfo(idb_directory, &file_info))
302 return base::Time(); 302 return base::Time();
303 return file_info.last_modified; 303 return file_info.last_modified;
304 } 304 }
305 305
306 void IndexedDBContextImpl::DeleteForOrigin(const GURL& origin_url) { 306 void IndexedDBContextImpl::DeleteForOrigin(const GURL& origin_url) {
307 DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); 307 DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
308 ForceClose(origin_url); 308 ForceClose(origin_url);
309 if (data_path_.empty() || !IsInOriginSet(origin_url)) 309 if (data_path_.empty() || !IsInOriginSet(origin_url))
310 return; 310 return;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 origin_set_.reset(); 582 origin_set_.reset();
583 origin_size_map_.clear(); 583 origin_size_map_.clear();
584 space_available_map_.clear(); 584 space_available_map_.clear();
585 } 585 }
586 586
587 base::TaskRunner* IndexedDBContextImpl::TaskRunner() const { 587 base::TaskRunner* IndexedDBContextImpl::TaskRunner() const {
588 return task_runner_; 588 return task_runner_;
589 } 589 }
590 590
591 } // namespace content 591 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/fileapi/local_file_util_unittest.cc ('k') | content/browser/net/sqlite_persistent_cookie_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698