Commit b502c868 authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Show no prefix label for external storage in crostini settings

Bug: 928566
Change-Id: I71b926342738cbe3a44615b2f8c287308b552f8d
Reviewed-on: https://chromium-review.googlesource.com/c/1481179
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Auto-Submit: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarStuart Langley <slangley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634472}
parent a6fa2616
......@@ -68,9 +68,6 @@
<message name="IDS_FILE_BROWSER_MY_FILES_ROOT_LABEL" desc="A label for the 'My files' root which is parent of Downloads, Linux and Android files. Use sentence case.">
My files
</message>
<message name="IDS_FILE_BROWSER_EXTERNAL_STORAGE_ROOT_LABEL" desc="A label for external USB storage. Use sentence case.">
External storage
</message>
<message name="IDS_FILE_BROWSER_MEDIA_VIEW_IMAGES_ROOT_LABEL" desc="A label for the 'Images' root of media views.">
Images
</message>
......
......@@ -560,9 +560,12 @@ std::string GetPathDisplayTextForSettings(Profile* profile,
} else if (ReplacePrefix(&result, GetCrostiniMountDirectory(profile).value(),
l10n_util::GetStringUTF8(
IDS_FILE_BROWSER_LINUX_FILES_ROOT_LABEL))) {
} else if (ReplacePrefix(&result, kRemovableMediaPath,
l10n_util::GetStringUTF8(
IDS_FILE_BROWSER_EXTERNAL_STORAGE_ROOT_LABEL))) {
} else if (ReplacePrefix(&result,
base::FilePath(kRemovableMediaPath)
.AsEndingWithSeparator()
.value(),
"")) {
// Strip prefix of "/media/removable/" including trailing slash.
}
base::ReplaceChars(result, "/", " \u203a ", &result);
......
......@@ -184,9 +184,8 @@ TEST_F(FileManagerPathUtilTest, GetPathDisplayTextForSettings) {
GetPathDisplayTextForSettings(
profile_.get(),
"/media/fuse/crostini_0123456789abcdef_termina_penguin/foo"));
EXPECT_EQ(
"External storage \u203a foo",
GetPathDisplayTextForSettings(profile_.get(), "/media/removable/foo"));
EXPECT_EQ("foo", GetPathDisplayTextForSettings(profile_.get(),
"/media/removable/foo"));
{
base::test::ScopedFeatureList features;
features.InitAndDisableFeature(chromeos::features::kDriveFs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment