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

Side by Side Diff: webkit/browser/fileapi/sandbox_directory_database.h

Issue 145303002: Convert Media Galleries to use base::File (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 10 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 #ifndef WEBKIT_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_
6 #define WEBKIT_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_ 6 #define WEBKIT_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/files/file.h"
11 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "base/platform_file.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "webkit/browser/webkit_storage_browser_export.h" 15 #include "webkit/browser/webkit_storage_browser_export.h"
16 16
17 namespace tracked_objects { 17 namespace tracked_objects {
18 class Location; 18 class Location;
19 } 19 }
20 20
21 namespace leveldb { 21 namespace leveldb {
22 class DB; 22 class DB;
23 class Status; 23 class Status;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 bool GetChildWithName( 63 bool GetChildWithName(
64 FileId parent_id, 64 FileId parent_id,
65 const base::FilePath::StringType& name, 65 const base::FilePath::StringType& name,
66 FileId* child_id); 66 FileId* child_id);
67 bool GetFileWithPath(const base::FilePath& path, FileId* file_id); 67 bool GetFileWithPath(const base::FilePath& path, FileId* file_id);
68 // ListChildren will succeed, returning 0 children, if parent_id doesn't 68 // ListChildren will succeed, returning 0 children, if parent_id doesn't
69 // exist. 69 // exist.
70 bool ListChildren(FileId parent_id, std::vector<FileId>* children); 70 bool ListChildren(FileId parent_id, std::vector<FileId>* children);
71 bool GetFileInfo(FileId file_id, FileInfo* info); 71 bool GetFileInfo(FileId file_id, FileInfo* info);
72 base::PlatformFileError AddFileInfo(const FileInfo& info, FileId* file_id); 72 base::File::Error AddFileInfo(const FileInfo& info, FileId* file_id);
73 bool RemoveFileInfo(FileId file_id); 73 bool RemoveFileInfo(FileId file_id);
74 // This does a full update of the FileInfo, and is what you'd use for moves 74 // This does a full update of the FileInfo, and is what you'd use for moves
75 // and renames. If you just want to update the modification_time, use 75 // and renames. If you just want to update the modification_time, use
76 // UpdateModificationTime. 76 // UpdateModificationTime.
77 bool UpdateFileInfo(FileId file_id, const FileInfo& info); 77 bool UpdateFileInfo(FileId file_id, const FileInfo& info);
78 bool UpdateModificationTime( 78 bool UpdateModificationTime(
79 FileId file_id, const base::Time& modification_time); 79 FileId file_id, const base::Time& modification_time);
80 // This is used for an overwriting move of a file [not a directory] on top of 80 // This is used for an overwriting move of a file [not a directory] on top of
81 // another file [also not a directory]; we need to alter two files' info in a 81 // another file [also not a directory]; we need to alter two files' info in a
82 // single transaction to avoid weird backing file references in the event of a 82 // single transaction to avoid weird backing file references in the event of a
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 const base::FilePath filesystem_data_directory_; 119 const base::FilePath filesystem_data_directory_;
120 scoped_ptr<leveldb::DB> db_; 120 scoped_ptr<leveldb::DB> db_;
121 base::Time last_reported_time_; 121 base::Time last_reported_time_;
122 DISALLOW_COPY_AND_ASSIGN(SandboxDirectoryDatabase); 122 DISALLOW_COPY_AND_ASSIGN(SandboxDirectoryDatabase);
123 }; 123 };
124 124
125 } // namespace fileapi 125 } // namespace fileapi
126 126
127 #endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_ 127 #endif // WEBKIT_BROWSER_FILEAPI_SANDBOX_DIRECTORY_DATABASE_H_
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/remove_operation_delegate.cc ('k') | webkit/browser/fileapi/sandbox_directory_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698