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

Unified Diff: chrome/browser/chromeos/file_manager/volume_manager.cc

Issue 271533004: Turning on MultiProfile by default for ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/file_manager/volume_manager.cc
diff --git a/chrome/browser/chromeos/file_manager/volume_manager.cc b/chrome/browser/chromeos/file_manager/volume_manager.cc
index 1d3ea1e5287cb38f475aa892557f03a689a0a25e..9edaa4f7c5351236322955d62eca85aa9b10cb36 100644
--- a/chrome/browser/chromeos/file_manager/volume_manager.cc
+++ b/chrome/browser/chromeos/file_manager/volume_manager.cc
@@ -15,6 +15,7 @@
#include "base/prefs/pref_service.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/sys_info.h"
#include "chrome/browser/chromeos/drive/drive_integration_service.h"
#include "chrome/browser/chromeos/drive/file_errors.h"
#include "chrome/browser/chromeos/drive/file_system_interface.h"
@@ -289,15 +290,21 @@ void VolumeManager::Initialize() {
new_path);
}
- // Register 'Downloads' folder for the profile to the file system.
- 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);
+ static bool added_downloads = false;
+ if (base::SysInfo::IsRunningOnChromeOS() || !added_downloads) {
+ // Register 'Downloads' folder for the profile to the file system.
+ // On non-ChromeOS system (test+development), we should do this only for
+ // the first registered profile.
+ const base::FilePath downloads =
+ file_manager::util::GetDownloadsFolderForProfile(profile_);
+ const bool success = RegisterDownloadsMountPoint(profile_, downloads);
+ added_downloads = success;
+ DCHECK(success);
+
+ DoMountEvent(chromeos::MOUNT_ERROR_NONE,
+ CreateDownloadsVolumeInfo(downloads),
+ kNotRemounting);
+ }
// Subscribe to DriveIntegrationService.
if (drive_integration_service_) {
« no previous file with comments | « chrome/browser/chromeos/file_manager/path_util.cc ('k') | chrome/browser/chromeos/login/chrome_restart_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698