Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PATH_MANAGER_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ | 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 namespace fileapi { | 21 namespace fileapi { |
| 22 | 22 |
| 23 class FileSystemPathManager { | 23 class FileSystemPathManager { |
| 24 public: | 24 public: |
| 25 FileSystemPathManager(scoped_refptr<base::MessageLoopProxy> file_message_loop, | 25 FileSystemPathManager(scoped_refptr<base::MessageLoopProxy> file_message_loop, |
| 26 const FilePath& profile_path, | 26 const FilePath& profile_path, |
| 27 bool is_incognito, | 27 bool is_incognito, |
| 28 bool allow_file_access_from_files); | 28 bool allow_file_access_from_files); |
| 29 ~FileSystemPathManager(); | 29 ~FileSystemPathManager(); |
| 30 | 30 |
| 31 static FilePath GetFileSystemCommonRootDirectory(const FilePath& root_path); | |
| 32 | |
| 31 // Callback for GetFileSystemRootPath. | 33 // Callback for GetFileSystemRootPath. |
| 32 // If the request is accepted and the root filesystem for the origin exists | 34 // If the request is accepted and the root filesystem for the origin exists |
| 33 // the callback is called with success=true and valid root_path and name. | 35 // the callback is called with success=true and valid root_path and name. |
| 34 // If the request is accepted, |create| is specified for | 36 // If the request is accepted, |create| is specified for |
| 35 // GetFileSystemRootPath, and the root directory does not exist, it creates | 37 // GetFileSystemRootPath, and the root directory does not exist, it creates |
| 36 // a new one and calls back with success=true if the creation has succeeded. | 38 // a new one and calls back with success=true if the creation has succeeded. |
| 37 typedef Callback3<bool /* success */, | 39 typedef Callback3<bool /* success */, |
| 38 const FilePath& /* root_path */, | 40 const FilePath& /* root_path */, |
| 39 const std::string& /* name */>::Type GetRootPathCallback; | 41 const std::string& /* name */>::Type GetRootPathCallback; |
| 40 | 42 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 } | 77 } |
| 76 | 78 |
| 77 private: | 79 private: |
| 78 class GetFileSystemRootPathTask; | 80 class GetFileSystemRootPathTask; |
| 79 | 81 |
| 80 // Returns the storage identifier string for the given |url|. | 82 // Returns the storage identifier string for the given |url|. |
| 81 static std::string GetStorageIdentifierFromURL(const GURL& url); | 83 static std::string GetStorageIdentifierFromURL(const GURL& url); |
| 82 | 84 |
| 83 scoped_refptr<base::MessageLoopProxy> file_message_loop_; | 85 scoped_refptr<base::MessageLoopProxy> file_message_loop_; |
| 84 | 86 |
| 85 const FilePath base_path_; | 87 FilePath base_path_; |
|
ericu
2010/11/25 04:18:35
Why remove the const?
| |
| 86 const bool is_incognito_; | 88 const bool is_incognito_; |
| 87 const bool allow_file_access_from_files_; | 89 const bool allow_file_access_from_files_; |
| 88 | 90 |
| 89 DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager); | 91 DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager); |
| 90 }; | 92 }; |
| 91 | 93 |
| 92 } // namespace fileapi | 94 } // namespace fileapi |
| 93 | 95 |
| 94 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ | 96 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ |
| OLD | NEW |