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_URL_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_URL_H_ |
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_URL_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_URL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 const FilePath& internal_path); | 26 const FilePath& internal_path); |
27 ~FileSystemURL(); | 27 ~FileSystemURL(); |
28 | 28 |
29 bool is_valid() const { return is_valid_; } | 29 bool is_valid() const { return is_valid_; } |
30 const GURL& origin() const { return origin_; } | 30 const GURL& origin() const { return origin_; } |
31 FileSystemType type() const { return type_; } | 31 FileSystemType type() const { return type_; } |
32 | 32 |
33 // TODO(kinuko): this must be std::string. | 33 // TODO(kinuko): this must be std::string. |
34 const FilePath& path() const { return path_; } | 34 const FilePath& path() const { return path_; } |
35 | 35 |
| 36 // For isolated filesystem. |
| 37 const std::string& filesystem_id() const { return filesystem_id_; } |
| 38 |
36 std::string spec() const; | 39 std::string spec() const; |
37 | 40 |
38 // Returns a new FileSystemURL with the given path. | 41 // Returns a new FileSystemURL with the given path. |
39 // This doesn't change the calling instance's data. | 42 // This doesn't change the calling instance's data. |
40 FileSystemURL WithPath(const FilePath& path) const; | 43 FileSystemURL WithPath(const FilePath& path) const; |
41 | 44 |
42 bool operator==(const FileSystemURL& that) const; | 45 bool operator==(const FileSystemURL& that) const; |
43 | 46 |
44 private: | 47 private: |
| 48 void MayCrackIsolatedPath(); |
| 49 |
45 GURL origin_; | 50 GURL origin_; |
46 FileSystemType type_; | 51 FileSystemType type_; |
47 FilePath path_; | 52 FilePath path_; |
| 53 std::string filesystem_id_; // For isolated filesystem. |
| 54 |
48 bool is_valid_; | 55 bool is_valid_; |
49 }; | 56 }; |
50 | 57 |
51 } // namespace fileapi | 58 } // namespace fileapi |
52 | 59 |
53 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_H_ | 60 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_H_ |
OLD | NEW |