Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: chrome/browser/chromeos/fileapi/external_file_url_util.h

Issue 615523002: Files.app: Stop to use file system URLs having externalfile:// scheme origin internally. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_FILEAPI_EXTERNAL_FILE_URL_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_UTIL_H_
7 7
8 #include "storage/common/fileapi/file_system_types.h"
9
8 class GURL; 10 class GURL;
9 class Profile; 11 class Profile;
10 12
11 namespace base { 13 namespace base {
12 class FilePath; 14 class FilePath;
13 } 15 }
14 16
15 namespace storage { 17 namespace storage {
16 class FileSystemURL; 18 class FileSystemURL;
17 } 19 }
18 20
19 namespace chromeos { 21 namespace chromeos {
20 22
23 // Returns whether the external file URL is provided for the |type| or not.
24 bool IsExternalFileURLType(storage::FileSystemType type);
25
21 // Obtains the external file url formatted as "externalfile:<path>" from file 26 // Obtains the external file url formatted as "externalfile:<path>" from file
22 // path. Returns empty URL if the file system does not provide the external file 27 // path. Returns empty URL if the file system does not provide the external file
23 // URL. 28 // URL.
24 GURL FileSystemURLToExternalFileURL( 29 GURL FileSystemURLToExternalFileURL(
25 const storage::FileSystemURL& file_system_url); 30 const storage::FileSystemURL& file_system_url);
26 31
27 // Converts a externalfile: URL back to a virtual path of FileSystemURL. 32 // Converts a externalfile: URL back to a virtual path of FileSystemURL.
28 base::FilePath ExternalFileURLToVirtualPath(const GURL& url); 33 base::FilePath ExternalFileURLToVirtualPath(const GURL& url);
29 34
30 // Obtains external file URL (e.g. external:drive/root/sample.txt) from file 35 // Obtains external file URL (e.g. external:drive/root/sample.txt) from file
31 // path (e.g. /special/drive-xxx/root/sample.txt), if the |path| points an 36 // path (e.g. /special/drive-xxx/root/sample.txt), if the |path| points an
32 // external location (drive, MTP, or FSP). Otherwise, it returns empty URL. 37 // external location (drive, MTP, or FSP). Otherwise, it returns empty URL.
33 GURL CreateExternalFileURLFromPath(Profile* profile, 38 GURL CreateExternalFileURLFromPath(Profile* profile,
34 const base::FilePath& path); 39 const base::FilePath& path);
35 40
36 } // namespace chromeos 41 } // namespace chromeos
37 42
38 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_UTIL_H_ 43 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_EXTERNAL_FILE_URL_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698