Add feature flag MyFilesVolume and change path_util to use it
Add feature flag MyFilesVolume that when it's enabled the MyFiles folder will be an actual volume and Downloads will be just a plain folder inside it. Change GetDownloadsFolderForProfile to return <cryptohome>/MyFiles/Downloads when the flag is active. Add a new function GetMyFilesFolderForProfile which returns the correct folder to be used as volume root, when the flag is disable it returns the current value, by calling GetDownloadsFolderForProfile, which returns <cryptohome>/Downloads. When the flag is active it returns <cryptohome>/MyFiles. Change GetPathDisplayTextForSettings to recognize the <cryptohome>/MyFiles/Downloads pattern, for now it will return just Downloads. This is an initial work, follow up CLs wil change the rest of code base to use either GetDownloadsFolderForProfile (when the code wants the actual downloads folder) or GetMyFilesFolderForProfile when the code wants the volume root, previously these 2 situations were the same path; when the new flag is enabled they're different and depending on the use case we might have to change to GetMyFilesFolderForProfile. Bug: 873539 Change-Id: I7d01bc5370072ba574a6761d4a54d43d4b62ff6e Reviewed-on: https://chromium-review.googlesource.com/c/1298824 Commit-Queue: Luciano Pacheco <lucmult@chromium.org> Reviewed-by:Sam McNally <sammc@chromium.org> Cr-Commit-Position: refs/heads/master@{#602979}
Showing
Please register or sign in to comment