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_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 13 matching lines...) Expand all Loading... | |
| 24 FileSystemURL(const GURL& origin, | 24 FileSystemURL(const GURL& origin, |
| 25 FileSystemType type, | 25 FileSystemType type, |
| 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_; } |
|
satorux1
2012/08/20 03:51:43
function comment is missing. An example would be h
kinuko
2012/08/20 08:54:35
Done.
| |
| 35 | 35 |
| 36 // Returns the path part of the original filesysstem url. | |
|
kmadhusu
2012/08/14 18:01:13
nit: filesystem typo
kinuko
2012/08/20 08:54:35
Done.
| |
| 37 // Unless the path is cracked further this returns the same path as path(). | |
| 38 const FilePath& virtual_path() const { return virtual_path_; } | |
|
satorux1
2012/08/20 03:51:43
could you describe a bit more about the difference
kinuko
2012/08/20 08:54:35
Done. Also renamed virtual_path() to path_exposed
kinuko
2012/08/20 10:37:54
Per offline chat with tzik@ I renamed this back to
| |
| 39 | |
| 36 // For isolated filesystem. | 40 // For isolated filesystem. |
| 37 const std::string& filesystem_id() const { return filesystem_id_; } | 41 const std::string& filesystem_id() const { return filesystem_id_; } |
| 38 | 42 |
| 39 std::string spec() const; | 43 std::string spec() const; |
| 40 | 44 |
| 41 // Returns a new FileSystemURL with the given path. | 45 // Returns a new FileSystemURL with the given path. |
| 42 // This doesn't change the calling instance's data. | 46 // This doesn't change the calling instance's data. |
| 43 FileSystemURL WithPath(const FilePath& path) const; | 47 FileSystemURL WithPath(const FilePath& path) const; |
| 44 | 48 |
| 45 bool operator==(const FileSystemURL& that) const; | 49 bool operator==(const FileSystemURL& that) const; |
| 46 | 50 |
| 47 private: | 51 private: |
| 48 void MayCrackIsolatedPath(); | 52 void MayCrackIsolatedPath(); |
| 49 | 53 |
| 50 GURL origin_; | 54 GURL origin_; |
| 51 FileSystemType type_; | 55 FileSystemType type_; |
| 52 FilePath path_; | 56 FilePath path_; |
| 53 std::string filesystem_id_; // For isolated filesystem. | 57 |
| 58 // For isolated filesystem. | |
| 59 std::string filesystem_id_; | |
| 60 FilePath virtual_path_; | |
| 54 | 61 |
| 55 bool is_valid_; | 62 bool is_valid_; |
| 56 }; | 63 }; |
| 57 | 64 |
| 58 } // namespace fileapi | 65 } // namespace fileapi |
| 59 | 66 |
| 60 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_H_ | 67 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_URL_H_ |
| OLD | NEW |