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

Side by Side Diff: chrome/browser/chromeos/file_manager/volume_manager.cc

Issue 2945023002: Introduce profile for lock screen apps (Closed)
Patch Set: rebase Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/file_manager/volume_manager.h" 5 #include "chrome/browser/chromeos/file_manager/volume_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 340 }
341 341
342 VolumeManager::~VolumeManager() { 342 VolumeManager::~VolumeManager() {
343 } 343 }
344 344
345 VolumeManager* VolumeManager::Get(content::BrowserContext* context) { 345 VolumeManager* VolumeManager::Get(content::BrowserContext* context) {
346 return VolumeManagerFactory::Get(context); 346 return VolumeManagerFactory::Get(context);
347 } 347 }
348 348
349 void VolumeManager::Initialize() { 349 void VolumeManager::Initialize() {
350 // If in Sign in profile, then skip mounting and listening for mount events. 350 // If in the Sign in profile pr the lock screen app profile, skip mounting
351 if (chromeos::ProfileHelper::IsSigninProfile(profile_)) 351 // and listening for mount events.
352 if (chromeos::ProfileHelper::IsSigninProfile(profile_) ||
353 chromeos::ProfileHelper::IsLockScreenAppProfile(profile_)) {
352 return; 354 return;
355 }
353 356
354 // Register 'Downloads' folder for the profile to the file system. 357 // Register 'Downloads' folder for the profile to the file system.
355 const base::FilePath downloads = 358 const base::FilePath downloads =
356 file_manager::util::GetDownloadsFolderForProfile(profile_); 359 file_manager::util::GetDownloadsFolderForProfile(profile_);
357 const bool success = RegisterDownloadsMountPoint(profile_, downloads); 360 const bool success = RegisterDownloadsMountPoint(profile_, downloads);
358 DCHECK(success); 361 DCHECK(success);
359 362
360 DoMountEvent(chromeos::MOUNT_ERROR_NONE, 363 DoMountEvent(chromeos::MOUNT_ERROR_NONE,
361 Volume::CreateForDownloads(downloads)); 364 Volume::CreateForDownloads(downloads));
362 365
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 // |mounted_volumes_|, because OnVolumeMounted() will access it. 999 // |mounted_volumes_|, because OnVolumeMounted() will access it.
997 volume_ref = std::move(iter->second); 1000 volume_ref = std::move(iter->second);
998 mounted_volumes_.erase(iter); 1001 mounted_volumes_.erase(iter);
999 } 1002 }
1000 1003
1001 for (auto& observer : observers_) 1004 for (auto& observer : observers_)
1002 observer.OnVolumeUnmounted(error_code, volume); 1005 observer.OnVolumeUnmounted(error_code, volume);
1003 } 1006 }
1004 1007
1005 } // namespace file_manager 1008 } // namespace file_manager
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_util.cc ('k') | chrome/browser/chromeos/file_system_provider/mount_path_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698