Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/file_path.h" | 11 #include "base/file_path.h" |
| 12 #include "base/platform_file.h" | 12 #include "base/platform_file.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h" |
| 14 #include "webkit/fileapi/file_system_types.h" | 14 #include "webkit/fileapi/file_system_types.h" |
| 15 #include "webkit/quota/quota_types.h" | 15 #include "webkit/quota/quota_types.h" |
| 16 #include "webkit/storage/webkit_storage_export.h" | 16 #include "webkit/storage/webkit_storage_export.h" |
| 17 | 17 |
| 18 class GURL; | 18 class GURL; |
| 19 | 19 |
| 20 namespace fileapi { | 20 namespace fileapi { |
| 21 | 21 |
| 22 extern const char kPersistentDir[]; | 22 WEBKIT_STORAGE_EXPORT extern const char kPersistentDir[]; |
| 23 extern const char kTemporaryDir[]; | 23 WEBKIT_STORAGE_EXPORT extern const char kTemporaryDir[]; |
| 24 extern const char kExternalDir[]; | 24 WEBKIT_STORAGE_EXPORT extern const char kExternalDir[]; |
| 25 extern const char kIsolatedDir[]; | 25 WEBKIT_STORAGE_EXPORT extern const char kIsolatedDir[]; |
| 26 extern const char kTestDir[]; | 26 WEBKIT_STORAGE_EXPORT extern const char kTestDir[]; |
|
kinuko
2012/10/19 04:07:19
This change is not necessary now?
hashimoto
2012/10/19 07:07:45
You're right, thanks.
Done.
| |
| 27 | 27 |
| 28 class WEBKIT_STORAGE_EXPORT VirtualPath { | 28 class WEBKIT_STORAGE_EXPORT VirtualPath { |
| 29 public: | 29 public: |
| 30 // Use this instead of FilePath::BaseName when operating on virtual paths. | 30 // Use this instead of FilePath::BaseName when operating on virtual paths. |
| 31 // FilePath::BaseName will get confused by ':' on Windows when it looks like a | 31 // FilePath::BaseName will get confused by ':' on Windows when it looks like a |
| 32 // drive letter separator; this will treat it as just another character. | 32 // drive letter separator; this will treat it as just another character. |
| 33 static FilePath BaseName(const FilePath& virtual_path); | 33 static FilePath BaseName(const FilePath& virtual_path); |
| 34 | 34 |
| 35 // Likewise, use this instead of FilePath::GetComponents when operating on | 35 // Likewise, use this instead of FilePath::GetComponents when operating on |
| 36 // virtual paths. | 36 // virtual paths. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 // platform apps. This function will return false if the file system name is | 119 // platform apps. This function will return false if the file system name is |
| 120 // not of the form {origin}:Isolated_{id}, and will also check that there is an | 120 // not of the form {origin}:Isolated_{id}, and will also check that there is an |
| 121 // origin and id present. It will not check that the origin or id are valid. | 121 // origin and id present. It will not check that the origin or id are valid. |
| 122 WEBKIT_STORAGE_EXPORT bool CrackIsolatedFileSystemName( | 122 WEBKIT_STORAGE_EXPORT bool CrackIsolatedFileSystemName( |
| 123 const std::string& filesystem_name, | 123 const std::string& filesystem_name, |
| 124 std::string* filesystem_id); | 124 std::string* filesystem_id); |
| 125 | 125 |
| 126 } // namespace fileapi | 126 } // namespace fileapi |
| 127 | 127 |
| 128 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_UTIL_H_ | 128 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_UTIL_H_ |
| OLD | NEW |