#include "chrome/common/chrome_paths.h"
#include "base/files/file_path.h"
#include "base/fuchsia/file_utils.h"
#include "base/notreached.h"
namespace chrome {
namespace {
constexpr char kDocumentsDir[] = "Documents";
constexpr char kDownloadsDir[] = "Downloads";
}
bool GetDefaultUserDataDirectory(base::FilePath* result) {
*result = base::FilePath(base::kPersistedDataDirectoryPath);
return true;
}
void GetUserCacheDirectory(const base::FilePath& profile_dir,
base::FilePath* result) {
*result = base::FilePath(base::kPersistedCacheDirectoryPath);
}
bool GetUserDocumentsDirectory(base::FilePath* result) {
if (!GetDefaultUserDataDirectory(result))
return false;
*result = result->Append(kDocumentsDir);
return true;
}
bool GetUserDownloadsDirectorySafe(base::FilePath* result) {
if (!GetDefaultUserDataDirectory(result))
return false;
*result = result->Append(kDownloadsDir);
return true;
}
bool GetUserDownloadsDirectory(base::FilePath* result) {
return GetUserDownloadsDirectorySafe(result);
}
bool GetUserMusicDirectory(base::FilePath* result) {
NOTIMPLEMENTED_LOG_ONCE();
return false;
}
bool GetUserPicturesDirectory(base::FilePath* result) {
NOTIMPLEMENTED_LOG_ONCE();
return false;
}
bool GetUserVideosDirectory(base::FilePath* result) {
NOTIMPLEMENTED_LOG_ONCE();
return false;
}
bool ProcessNeedsProfileDir(const std::string& process_type) {
return process_type.empty();
}
}