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

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

Issue 105293002: Move more file_util functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 EnsureDiskUsageCacheInitialized(origin_url); 288 EnsureDiskUsageCacheInitialized(origin_url);
289 return origin_size_map_[origin_url]; 289 return origin_size_map_[origin_url];
290 } 290 }
291 291
292 base::Time IndexedDBContextImpl::GetOriginLastModified(const GURL& origin_url) { 292 base::Time IndexedDBContextImpl::GetOriginLastModified(const GURL& origin_url) {
293 DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); 293 DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
294 if (data_path_.empty() || !IsInOriginSet(origin_url)) 294 if (data_path_.empty() || !IsInOriginSet(origin_url))
295 return base::Time(); 295 return base::Time();
296 base::FilePath idb_directory = GetFilePath(origin_url); 296 base::FilePath idb_directory = GetFilePath(origin_url);
297 base::PlatformFileInfo file_info; 297 base::PlatformFileInfo file_info;
298 if (!file_util::GetFileInfo(idb_directory, &file_info)) 298 if (!base::GetFileInfo(idb_directory, &file_info))
299 return base::Time(); 299 return base::Time();
300 return file_info.last_modified; 300 return file_info.last_modified;
301 } 301 }
302 302
303 void IndexedDBContextImpl::DeleteForOrigin(const GURL& origin_url) { 303 void IndexedDBContextImpl::DeleteForOrigin(const GURL& origin_url) {
304 DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); 304 DCHECK(TaskRunner()->RunsTasksOnCurrentThread());
305 ForceClose(origin_url); 305 ForceClose(origin_url);
306 if (data_path_.empty() || !IsInOriginSet(origin_url)) 306 if (data_path_.empty() || !IsInOriginSet(origin_url))
307 return; 307 return;
308 308
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 origin_set_.reset(); 571 origin_set_.reset();
572 origin_size_map_.clear(); 572 origin_size_map_.clear();
573 space_available_map_.clear(); 573 space_available_map_.clear();
574 } 574 }
575 575
576 base::TaskRunner* IndexedDBContextImpl::TaskRunner() const { 576 base::TaskRunner* IndexedDBContextImpl::TaskRunner() const {
577 return task_runner_; 577 return task_runner_;
578 } 578 }
579 579
580 } // namespace content 580 } // 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