OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_CONTENT_FILE_SYSTEM_URL_UTIL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_CONTENT_FILE_SYSTEM_URL_UTIL_H_ |
6 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_CONTENT_FILE_SYSTEM_URL_UTIL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_CONTENT_FILE_SYSTEM_URL_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 GURL ArcUrlToExternalFileUrl(const GURL& arc_url); | 33 GURL ArcUrlToExternalFileUrl(const GURL& arc_url); |
34 | 34 |
35 // Converts an externalfile: URL to a URL which can be used within the ARC | 35 // Converts an externalfile: URL to a URL which can be used within the ARC |
36 // container. If the given URL cannot be converted to an ARC URL, returns an | 36 // container. If the given URL cannot be converted to an ARC URL, returns an |
37 // empty GURL. | 37 // empty GURL. |
38 GURL ExternalFileUrlToArcUrl(const GURL& external_file_url); | 38 GURL ExternalFileUrlToArcUrl(const GURL& external_file_url); |
39 | 39 |
40 // Converts a FileSystemURL to a URL which can be used within the ARC container. | 40 // Converts a FileSystemURL to a URL which can be used within the ARC container. |
41 GURL FileSystemUrlToArcUrl(const storage::FileSystemURL& url); | 41 GURL FileSystemUrlToArcUrl(const storage::FileSystemURL& url); |
42 | 42 |
| 43 // Converts a path which was returned by FileSystemURL::path() (not to be |
| 44 // confused with virtual_path()) to a URL which can be used within the ARC |
| 45 // container. If the given path is not under the ARC content file system mount |
| 46 // point, returns an empty GURL. |
| 47 GURL PathToArcUrl(const base::FilePath& path); |
| 48 |
43 } // namespace arc | 49 } // namespace arc |
44 | 50 |
45 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_CONTENT_FILE_SYSTEM_URL_UTIL_
H_ | 51 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_CONTENT_FILE_SYSTEM_URL_UTIL_
H_ |
OLD | NEW |