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

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

Issue 141473004: Random cleanup for c/b/cros/extensions/file_manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_tasks.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 175
176 VolumeManager* VolumeManager::Get(content::BrowserContext* context) { 176 VolumeManager* VolumeManager::Get(content::BrowserContext* context) {
177 return VolumeManagerFactory::Get(context); 177 return VolumeManagerFactory::Get(context);
178 } 178 }
179 179
180 void VolumeManager::Initialize() { 180 void VolumeManager::Initialize() {
181 // Path to mount user folders have changed several times. We need to migrate 181 // Path to mount user folders have changed several times. We need to migrate
182 // the old preferences on paths to the new format when needed. For the detail, 182 // the old preferences on paths to the new format when needed. For the detail,
183 // see the comments in file_manager::util::MigratePathFromOldFormat, 183 // see the comments in file_manager::util::MigratePathFromOldFormat,
184 // Note: Preferences related to downloads are handled in download_prefs.cc. 184 // Note: Preferences related to downloads are handled in download_prefs.cc.
185 // TODO(kinaba): Remove this are several rounds of releases. 185 // TODO(kinaba): Remove this after several rounds of releases.
186 const base::FilePath old_path = 186 const base::FilePath old_path =
187 profile_->GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); 187 profile_->GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory);
188 base::FilePath new_path; 188 base::FilePath new_path;
189 if (!old_path.empty() && 189 if (!old_path.empty() &&
190 file_manager::util::MigratePathFromOldFormat(profile_, 190 file_manager::util::MigratePathFromOldFormat(profile_,
191 old_path, &new_path)) { 191 old_path, &new_path)) {
192 profile_->GetPrefs()->SetFilePath(prefs::kSelectFileLastDirectory, 192 profile_->GetPrefs()->SetFilePath(prefs::kSelectFileLastDirectory,
193 new_path); 193 new_path);
194 } 194 }
195 195
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 disk_mount_manager_->mount_points().begin()->second.mount_path; 487 disk_mount_manager_->mount_points().begin()->second.mount_path;
488 disk_mount_manager_->UnmountPath( 488 disk_mount_manager_->UnmountPath(
489 mount_path, 489 mount_path,
490 chromeos::UNMOUNT_OPTIONS_NONE, 490 chromeos::UNMOUNT_OPTIONS_NONE,
491 chromeos::disks::DiskMountManager::UnmountPathCallback()); 491 chromeos::disks::DiskMountManager::UnmountPathCallback());
492 } 492 }
493 } 493 }
494 } 494 }
495 495
496 } // namespace file_manager 496 } // namespace file_manager
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/private_api_tasks.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698