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

Side by Side Diff: webkit/fileapi/file_system_util.h

Issue 12886018: Add support for WEBKIT_USE_NEW_WEBFILESYSTEMTYPE (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « webkit/fileapi/file_system_types.h ('k') | webkit/fileapi/file_system_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_FILEAPI_FILE_SYSTEM_UTIL_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_UTIL_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_UTIL_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/platform_file.h" 12 #include "base/platform_file.h"
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebFileSystemType.h "
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h"
14 #include "webkit/fileapi/file_system_types.h" 15 #include "webkit/fileapi/file_system_types.h"
15 #include "webkit/quota/quota_types.h" 16 #include "webkit/quota/quota_types.h"
16 #include "webkit/storage/webkit_storage_export.h" 17 #include "webkit/storage/webkit_storage_export.h"
17 18
18 class GURL; 19 class GURL;
19 20
20 namespace fileapi { 21 namespace fileapi {
21 22
22 class FileSystemURL; 23 class FileSystemURL;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const std::string& origin_identifier); 108 const std::string& origin_identifier);
108 109
109 // Returns the string representation of the given filesystem |type|. 110 // Returns the string representation of the given filesystem |type|.
110 // Returns an empty string if the |type| is invalid. 111 // Returns an empty string if the |type| is invalid.
111 WEBKIT_STORAGE_EXPORT std::string GetFileSystemTypeString(FileSystemType type); 112 WEBKIT_STORAGE_EXPORT std::string GetFileSystemTypeString(FileSystemType type);
112 113
113 // Sets type to FileSystemType enum that corresponds to the string name. 114 // Sets type to FileSystemType enum that corresponds to the string name.
114 // Returns false if the |type_string| is invalid. 115 // Returns false if the |type_string| is invalid.
115 WEBKIT_STORAGE_EXPORT bool GetFileSystemPublicType( 116 WEBKIT_STORAGE_EXPORT bool GetFileSystemPublicType(
116 std::string type_string, 117 std::string type_string,
117 WebKit::WebFileSystem::Type* type); 118 #ifdef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
119 WebKit::WebFileSystemType* type
120 #else
121 WebKit::WebFileSystem::Type* type
122 #endif
123 );
118 124
119 // Encodes |file_path| to a string. 125 // Encodes |file_path| to a string.
120 // Following conditions should be held: 126 // Following conditions should be held:
121 // - StringToFilePath(FilePathToString(path)) == path 127 // - StringToFilePath(FilePathToString(path)) == path
122 // - StringToFilePath(FilePathToString(path) + "/" + "SubDirectory") == 128 // - StringToFilePath(FilePathToString(path) + "/" + "SubDirectory") ==
123 // path.AppendASCII("SubDirectory"); 129 // path.AppendASCII("SubDirectory");
124 // 130 //
125 // TODO(tzik): Replace CreateFilePath and FilePathToString in 131 // TODO(tzik): Replace CreateFilePath and FilePathToString in
126 // third_party/leveldatabase/env_chromium.cc with them. 132 // third_party/leveldatabase/env_chromium.cc with them.
127 WEBKIT_STORAGE_EXPORT std::string FilePathToString(const base::FilePath& file_pa th); 133 WEBKIT_STORAGE_EXPORT std::string FilePathToString(const base::FilePath& file_pa th);
(...skipping 30 matching lines...) Expand all
158 164
159 // Returns true if |url1| and |url2| belong to the same filesystem 165 // Returns true if |url1| and |url2| belong to the same filesystem
160 // (i.e. url1.origin() == url2.origin() && url1.type() == url2.type()) 166 // (i.e. url1.origin() == url2.origin() && url1.type() == url2.type())
161 WEBKIT_STORAGE_EXPORT bool AreSameFileSystem( 167 WEBKIT_STORAGE_EXPORT bool AreSameFileSystem(
162 const FileSystemURL& url1, 168 const FileSystemURL& url1,
163 const FileSystemURL& url2); 169 const FileSystemURL& url2);
164 170
165 } // namespace fileapi 171 } // namespace fileapi
166 172
167 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_UTIL_H_ 173 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_UTIL_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_types.h ('k') | webkit/fileapi/file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698