| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_MANAGER_PATH_UTIL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_PATH_UTIL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_PATH_UTIL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_PATH_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" |
| 11 |
| 10 class GURL; | 12 class GURL; |
| 11 class Profile; | 13 class Profile; |
| 12 | 14 |
| 13 namespace base { | |
| 14 class FilePath; | |
| 15 } | |
| 16 | |
| 17 namespace file_manager { | 15 namespace file_manager { |
| 18 namespace util { | 16 namespace util { |
| 19 | 17 |
| 18 // Absolute base path for removable media on Chrome OS. Exposed here so it can |
| 19 // be used by tests. |
| 20 extern const base::FilePath::CharType kRemovableMediaPath[]; |
| 21 |
| 20 // Gets the absolute path for the 'Downloads' folder for the |profile|. | 22 // Gets the absolute path for the 'Downloads' folder for the |profile|. |
| 21 base::FilePath GetDownloadsFolderForProfile(Profile* profile); | 23 base::FilePath GetDownloadsFolderForProfile(Profile* profile); |
| 22 | 24 |
| 23 // Converts |old_path| to |new_path| and returns true, if the old path points | 25 // Converts |old_path| to |new_path| and returns true, if the old path points |
| 24 // to an old location of user folders (in "Downloads" or "Google Drive"). | 26 // to an old location of user folders (in "Downloads" or "Google Drive"). |
| 25 // The |profile| argument is used for determining the location of the | 27 // The |profile| argument is used for determining the location of the |
| 26 // "Downloads" folder. | 28 // "Downloads" folder. |
| 27 // | 29 // |
| 28 // As of now (M40), the conversion is used only during initialization of | 30 // As of now (M40), the conversion is used only during initialization of |
| 29 // download_prefs, where profile unaware initialization precedes profile | 31 // download_prefs, where profile unaware initialization precedes profile |
| (...skipping 11 matching lines...) Expand all Loading... |
| 41 std::string GetDownloadsMountPointName(Profile* profile); | 43 std::string GetDownloadsMountPointName(Profile* profile); |
| 42 | 44 |
| 43 // Converts a Chrome OS file path to an ARC file URL. Returns true if the path | 45 // Converts a Chrome OS file path to an ARC file URL. Returns true if the path |
| 44 // was converted successfully and false otherwise. | 46 // was converted successfully and false otherwise. |
| 45 bool ConvertPathToArcUrl(const base::FilePath& path, GURL* arc_url_out); | 47 bool ConvertPathToArcUrl(const base::FilePath& path, GURL* arc_url_out); |
| 46 | 48 |
| 47 } // namespace util | 49 } // namespace util |
| 48 } // namespace file_manager | 50 } // namespace file_manager |
| 49 | 51 |
| 50 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_PATH_UTIL_H_ | 52 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_PATH_UTIL_H_ |
| OLD | NEW |