Commit 9cb74060 authored by Risan's avatar Risan Committed by Commit Bot

Ignore non local source_path for volume_mounter

source_path like drivefs:// should be ignored in Chrome instead of being
published to Android.

BUG=b:119122689
TEST=Manual. See that drivefs mount doesn't flown through ARC++
container.

Change-Id: I0ff1c8af00ad83c7c968f6d9616353942290dc5d
Reviewed-on: https://chromium-review.googlesource.com/c/1333268Reviewed-by: default avatarRyo Hashimoto <hashimoto@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Risan <risan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608685}
parent c5dd68a2
include_rules = [
"+chromeos/disks",
"+third_party/re2",
]
......@@ -12,6 +12,7 @@
#include "chromeos/disks/disk_mount_manager.h"
#include "components/arc/arc_bridge_service.h"
#include "components/arc/arc_browser_context_keyed_service_factory_base.h"
#include "third_party/re2/src/re2/re2.h"
using chromeos::disks::DiskMountManager;
......@@ -82,6 +83,14 @@ void ArcVolumeMounterBridge::OnMountEvent(
DiskMountManager::MountEvent event,
chromeos::MountError error_code,
const chromeos::disks::DiskMountManager::MountPointInfo& mount_info) {
// ArcVolumeMounter is limited for local storage, as Android's StorageManager
// volume concept relies on assumption that it is local filesystem. Hence,
// special volumes like DriveFS should not come through this path.
if (RE2::FullMatch(mount_info.source_path, "[a-z]+://.*")) {
DVLOG(1) << "Ignoring mount event for source_path: "
<< mount_info.source_path;
return;
}
if (error_code != chromeos::MountError::MOUNT_ERROR_NONE) {
DVLOG(1) << "Error " << error_code << "occurs during MountEvent " << event;
return;
......
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