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_PATH_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_PATH_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_PATH_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_PATH_H_ |
7 | 7 |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| 11 #include "webkit/fileapi/fileapi_export.h" |
11 #include "webkit/fileapi/file_system_types.h" | 12 #include "webkit/fileapi/file_system_types.h" |
12 | 13 |
13 namespace fileapi { | 14 namespace fileapi { |
14 | 15 |
15 class FileSystemFileUtil; | 16 class FileSystemFileUtil; |
16 | 17 |
17 // A class representing a filesystem path which consists of origin URL, | 18 // A class representing a filesystem path which consists of origin URL, |
18 // type and an internal path used inside the filesystem. The class also has | 19 // type and an internal path used inside the filesystem. The class also has |
19 // a corresponding FileSystemFileUtil by which the filesystem file is | 20 // a corresponding FileSystemFileUtil by which the filesystem file is |
20 // handled. | 21 // handled. |
21 // NOTE: If we completely get rid of cross-filesystem operations under | 22 // NOTE: If we completely get rid of cross-filesystem operations under |
22 // FileSystemOperation we may end up converting all the FileSystemPath | 23 // FileSystemOperation we may end up converting all the FileSystemPath |
23 // occurences back to a FilePath's. | 24 // occurences back to a FilePath's. |
24 class FileSystemPath { | 25 class FILEAPI_EXPORT_PRIVATE FileSystemPath { |
25 public: | 26 public: |
26 FileSystemPath(); | 27 FileSystemPath(); |
27 FileSystemPath(const GURL& origin, | 28 FileSystemPath(const GURL& origin, |
28 FileSystemType type, | 29 FileSystemType type, |
29 const FilePath& internal_path); | 30 const FilePath& internal_path); |
30 ~FileSystemPath(); | 31 ~FileSystemPath(); |
31 | 32 |
32 // Gets and sets the origin URL of this filesystem. | 33 // Gets and sets the origin URL of this filesystem. |
33 const GURL& origin() const { return origin_; } | 34 const GURL& origin() const { return origin_; } |
34 void set_origin(const GURL& origin) { origin_ = origin; } | 35 void set_origin(const GURL& origin) { origin_ = origin; } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 75 |
75 private: | 76 private: |
76 GURL origin_; | 77 GURL origin_; |
77 FileSystemType type_; | 78 FileSystemType type_; |
78 FilePath internal_path_; | 79 FilePath internal_path_; |
79 }; | 80 }; |
80 | 81 |
81 } // namespace fileapi | 82 } // namespace fileapi |
82 | 83 |
83 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_H_ | 84 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_H_ |
OLD | NEW |