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

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

Issue 15658004: Split FileAPI code for common|common_child|renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « webkit/common/fileapi/file_system_types.h ('k') | webkit/common/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_COMMON_FILEAPI_FILE_SYSTEM_UTIL_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_UTIL_H_ 6 #define WEBKIT_COMMON_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/Platform/chromium/public/WebFileSystemType.h "
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h"
15 #include "webkit/fileapi/file_system_types.h" 15 #include "webkit/common/fileapi/file_system_types.h"
16 #include "webkit/quota/quota_types.h" 16 #include "webkit/quota/quota_types.h"
17 #include "webkit/storage/webkit_storage_export.h" 17 #include "webkit/storage/webkit_storage_export.h"
18 18
19 class GURL; 19 class GURL;
20 20
21 namespace fileapi { 21 namespace fileapi {
22 22
23 extern const char kPersistentDir[]; 23 extern const char kPersistentDir[];
24 extern const char kTemporaryDir[]; 24 extern const char kTemporaryDir[];
25 extern const char kExternalDir[]; 25 extern const char kExternalDir[];
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 WebKit::WebFileSystemType* type); 104 WebKit::WebFileSystemType* type);
105 105
106 // Encodes |file_path| to a string. 106 // Encodes |file_path| to a string.
107 // Following conditions should be held: 107 // Following conditions should be held:
108 // - StringToFilePath(FilePathToString(path)) == path 108 // - StringToFilePath(FilePathToString(path)) == path
109 // - StringToFilePath(FilePathToString(path) + "/" + "SubDirectory") == 109 // - StringToFilePath(FilePathToString(path) + "/" + "SubDirectory") ==
110 // path.AppendASCII("SubDirectory"); 110 // path.AppendASCII("SubDirectory");
111 // 111 //
112 // TODO(tzik): Replace CreateFilePath and FilePathToString in 112 // TODO(tzik): Replace CreateFilePath and FilePathToString in
113 // third_party/leveldatabase/env_chromium.cc with them. 113 // third_party/leveldatabase/env_chromium.cc with them.
114 WEBKIT_STORAGE_EXPORT std::string FilePathToString(const base::FilePath& file_pa th); 114 WEBKIT_STORAGE_EXPORT std::string FilePathToString(
115 const base::FilePath& file_path);
115 116
116 // Decode a file path from |file_path_string|. 117 // Decode a file path from |file_path_string|.
117 WEBKIT_STORAGE_EXPORT base::FilePath StringToFilePath( 118 WEBKIT_STORAGE_EXPORT base::FilePath StringToFilePath(
118 const std::string& file_path_string); 119 const std::string& file_path_string);
119 120
120 // File error conversion 121 // File error conversion
121 WEBKIT_STORAGE_EXPORT WebKit::WebFileError PlatformFileErrorToWebFileError( 122 WEBKIT_STORAGE_EXPORT WebKit::WebFileError PlatformFileErrorToWebFileError(
122 base::PlatformFileError error_code); 123 base::PlatformFileError error_code);
123 124
124 // Generate a file system name for the given arguments. Should only be used by 125 // Generate a file system name for the given arguments. Should only be used by
(...skipping 13 matching lines...) Expand all
138 // Returns the root URI for an isolated filesystem for origin |origin_url| 139 // Returns the root URI for an isolated filesystem for origin |origin_url|
139 // and |filesystem_id|. If the |optional_root_name| is given the resulting 140 // and |filesystem_id|. If the |optional_root_name| is given the resulting
140 // root URI will point to the subfolder within the isolated filesystem. 141 // root URI will point to the subfolder within the isolated filesystem.
141 WEBKIT_STORAGE_EXPORT std::string GetIsolatedFileSystemRootURIString( 142 WEBKIT_STORAGE_EXPORT std::string GetIsolatedFileSystemRootURIString(
142 const GURL& origin_url, 143 const GURL& origin_url,
143 const std::string& filesystem_id, 144 const std::string& filesystem_id,
144 const std::string& optional_root_name); 145 const std::string& optional_root_name);
145 146
146 } // namespace fileapi 147 } // namespace fileapi
147 148
148 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_UTIL_H_ 149 #endif // WEBKIT_COMMON_FILEAPI_FILE_SYSTEM_UTIL_H_
OLDNEW
« no previous file with comments | « webkit/common/fileapi/file_system_types.h ('k') | webkit/common/fileapi/file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698