| 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 "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
| 10 | 10 |
| 11 namespace storage { |
| 12 class FileSystemURL; |
| 13 } |
| 14 |
| 11 namespace arc { | 15 namespace arc { |
| 12 | 16 |
| 13 // The name of the ARC content file system mount point. | 17 // The name of the ARC content file system mount point. |
| 14 extern const char kMountPointName[]; | 18 extern const char kMountPointName[]; |
| 15 | 19 |
| 16 // The path of the ARC content file system mount point. | 20 // The path of the ARC content file system mount point. |
| 17 extern const base::FilePath::CharType kMountPointPath[]; | 21 extern const base::FilePath::CharType kMountPointPath[]; |
| 18 | 22 |
| 23 // Escapes the given ARC URL. |
| 24 std::string EscapeArcUrl(const GURL& arc_url); |
| 25 |
| 26 // Unescapes the given escaped ARC URL. |
| 27 GURL UnescapeArcUrl(const std::string& escaped_arc_url); |
| 28 |
| 19 // Converts a URL which can be used within the ARC container to an externalfile: | 29 // Converts a URL which can be used within the ARC container to an externalfile: |
| 20 // URL which can be used by Chrome. | 30 // URL which can be used by Chrome. |
| 21 GURL ArcUrlToExternalFileUrl(const GURL& arc_url); | 31 GURL ArcUrlToExternalFileUrl(const GURL& arc_url); |
| 22 | 32 |
| 23 // Converts an externalfile: URL to a URL which can be used within the ARC | 33 // Converts an externalfile: URL to a URL which can be used within the ARC |
| 24 // container. If the given URL cannot be converted to an ARC URL, returns an | 34 // container. If the given URL cannot be converted to an ARC URL, returns an |
| 25 // empty GURL. | 35 // empty GURL. |
| 26 GURL ExternalFileUrlToArcUrl(const GURL& external_file_url); | 36 GURL ExternalFileUrlToArcUrl(const GURL& external_file_url); |
| 27 | 37 |
| 38 // Converts a FileSystemURL to a URL which can be used within the ARC container. |
| 39 GURL FileSystemUrlToArcUrl(const storage::FileSystemURL& url); |
| 40 |
| 28 } // namespace arc | 41 } // namespace arc |
| 29 | 42 |
| 30 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_CONTENT_FILE_SYSTEM_URL_UTIL_
H_ | 43 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_CONTENT_FILE_SYSTEM_URL_UTIL_
H_ |
| OLD | NEW |