Commit 4fef343d authored by mtomasz@chromium.org's avatar mtomasz@chromium.org

Do not initialize the volume manager for sign in profiles.

Since the volumes are not used, and moreover some of them are shared between profiles, they volumes should not be mounted, and observers shouldn't be added.

TEST=Tested manually on a enterprise enrolled device.
BUG=349298

Review URL: https://codereview.chromium.org/190403002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255817 0039d316-1c4b-4281-b951-d872f2087c98
parent 4893ab17
......@@ -243,17 +243,19 @@ void VolumeManager::Initialize() {
new_path);
}
// If in Sign in profile, then skip mounting and listening for mount events.
if (chromeos::ProfileHelper::IsSigninProfile(profile_))
return;
// Register 'Downloads' folder for the profile to the file system.
if (!chromeos::ProfileHelper::IsSigninProfile(profile_)) {
const base::FilePath downloads =
file_manager::util::GetDownloadsFolderForProfile(profile_);
const bool success = RegisterDownloadsMountPoint(profile_, downloads);
DCHECK(success);
DoMountEvent(chromeos::MOUNT_ERROR_NONE,
CreateDownloadsVolumeInfo(downloads),
kNotRemounting);
}
const base::FilePath downloads =
file_manager::util::GetDownloadsFolderForProfile(profile_);
const bool success = RegisterDownloadsMountPoint(profile_, downloads);
DCHECK(success);
DoMountEvent(chromeos::MOUNT_ERROR_NONE,
CreateDownloadsVolumeInfo(downloads),
kNotRemounting);
// Subscribe to DriveIntegrationService.
if (drive_integration_service_) {
......
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