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

Unified Diff: chrome/browser/chromeos/drive/file_system_util.cc

Issue 197013007: Set drive as the default download folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes build errors Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/drive/file_system_util.cc
diff --git a/chrome/browser/chromeos/drive/file_system_util.cc b/chrome/browser/chromeos/drive/file_system_util.cc
index 283772e6a4ec46bad193b4c92b25aae438be50ce..4d2b7830068254fea4ed3babc6dc0b47056ca24f 100644
--- a/chrome/browser/chromeos/drive/file_system_util.cc
+++ b/chrome/browser/chromeos/drive/file_system_util.cc
@@ -127,6 +127,13 @@ const base::FilePath& GetDriveMyDriveRootPath() {
return drive_root_path;
}
+base::FilePath GetDriveMountPointPathUsingUserHash(
+ const std::string user_id_hash) {
+ return base::FilePath(kSpecialMountPointRoot).AppendASCII(
+ net::EscapePath(kDriveMountPointNameBase +
+ (user_id_hash.empty() ? "" : "-" + user_id_hash)));
+}
+
base::FilePath GetDriveMountPointPath(Profile* profile) {
std::string id = chromeos::ProfileHelper::GetUserIdHashFromProfile(profile);
if (id.empty()) {
@@ -141,8 +148,7 @@ base::FilePath GetDriveMountPointPath(Profile* profile) {
if (user)
id = user->username_hash();
}
- return base::FilePath(kSpecialMountPointRoot).AppendASCII(
- net::EscapePath(kDriveMountPointNameBase + (id.empty() ? "" : "-" + id)));
+ return GetDriveMountPointPathUsingUserHash(id);
}
FileSystemInterface* GetFileSystemByProfile(Profile* profile) {

Powered by Google App Engine
This is Rietveld 408576698