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

Side by Side Diff: trunk/src/chrome/browser/chromeos/file_system_provider/mount_path_util.h

Issue 242113007: Revert 264780 "[fsp] Add FileSystemURLParser to the file system ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | trunk/src/chrome/browser/chromeos/file_system_provider/mount_path_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_FILE_SYSTEM_PROVIDER_MOUNT_PATH_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_MOUNT_PATH_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_MOUNT_PATH_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_MOUNT_PATH_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 class Profile;
11 #include "webkit/browser/fileapi/file_system_url.h"
12 11
13 class Profile; 12 namespace base {
13 class FilePath;
14 } // namespace base
14 15
15 namespace chromeos { 16 namespace chromeos {
16 namespace file_system_provider { 17 namespace file_system_provider {
17
18 class ProvidedFileSystemInterface;
19
20 namespace util { 18 namespace util {
21 19
22 // Constructs a safe mount point path for the provided file system. 20 // Constructs a safe mount point path for the provided file system.
23 base::FilePath GetMountPath(Profile* profile, 21 base::FilePath GetMountPointPath(Profile* profile,
24 std::string extension_id, 22 std::string extension_id,
25 int file_system_id); 23 int file_system_id);
26
27 // Finds file system, which is responsible for handling the specified |url| by
28 // analysing the mount path.
29 // Also, extract the file path from the virtual path to be used by the file
30 // system operations.
31 class FileSystemURLParser {
32 public:
33 explicit FileSystemURLParser(const fileapi::FileSystemURL& url);
34 virtual ~FileSystemURLParser();
35
36 // Parses the |url| passed to the constructor. If parsing succeeds, then
37 // returns true. Otherwise, false.
38 bool Parse();
39
40 ProvidedFileSystemInterface* file_system() const { return file_system_; }
41 const base::FilePath& file_path() const { return file_path_; }
42
43 private:
44 fileapi::FileSystemURL url_;
45 ProvidedFileSystemInterface* file_system_;
46 base::FilePath file_path_;
47
48 DISALLOW_COPY_AND_ASSIGN(FileSystemURLParser);
49 };
50 24
51 } // namespace util 25 } // namespace util
52 } // namespace file_system_provider 26 } // namespace file_system_provider
53 } // namespace chromeos 27 } // namespace chromeos
54 28
55 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_MOUNT_PATH_UTIL_H_ 29 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_MOUNT_PATH_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | trunk/src/chrome/browser/chromeos/file_system_provider/mount_path_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698