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

Side by Side Diff: chrome/browser/chromeos/file_manager/path_util.h

Issue 216053002: Files.app multi-profile: add back migration to old path format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix Created 6 years, 9 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
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 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_PATH_UTIL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_PATH_UTIL_H_
6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_PATH_UTIL_H_ 6 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_PATH_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 class Profile; 10 class Profile;
(...skipping 15 matching lines...) Expand all
26 // 26 //
27 // Here's the list of relocations we have made so far. 27 // Here's the list of relocations we have made so far.
28 // 28 //
29 // M27: crbug.com/229304, Migration code for this is removed in M34. 29 // M27: crbug.com/229304, Migration code for this is removed in M34.
30 // The "Google Drive" folder is moved from /special/drive to 30 // The "Google Drive" folder is moved from /special/drive to
31 // /special/drive/root to stored shared files outside of "My Drive" in 31 // /special/drive/root to stored shared files outside of "My Drive" in
32 // /special/drive/other. 32 // /special/drive/other.
33 // 33 //
34 // M34: crbug.com/313539 34 // M34: crbug.com/313539
35 // The "Downloads" folder is changed from /home/chronos/user/Downloads to 35 // The "Downloads" folder is changed from /home/chronos/user/Downloads to
36 // /home/chronos/u-<hash>/Downloads to support multi profiles. 36 // /home/chronos/u-<hash>/Downloads when multi-profile is enabled.
37 // 37 //
38 // The path "/home/chronos/user" is a hard link to the u-<hash> directory of 38 // The path "/home/chronos/user" is a hard link to the u-<hash> directory of
39 // the primary profile of the current session. The two paths always meant the 39 // the primary profile of the current session. The two paths always meant the
40 // same directory before multi-profiles. However, for secondary profiles in 40 // same directory before multi-profiles. However, for secondary profiles in
41 // a multi-profile session, the "user" path cannot be used to mean "its own" 41 // a multi-profile session, the "user" path cannot be used to mean "its own"
42 // Download folder anymore. Thus we are switching to always use "u-<hash>" 42 // Download folder anymore. Thus we are switching to always use "u-<hash>"
43 // that consistently works whether or not multi-profile is enabled. 43 // that consistently works whether or not it is primary.
44 // 44 //
45 // M34: crbug.com/336123 45 // M35: crbug.com/356322
46 // The "Google Drive" folder is changed from /special/drive to 46 // It turned out even if multi-profile is disabled, u-<hash> style profile
47 // /special/drive-<profile-id> to support multi profiles. 47 // can be used in some situations. To address the cases, we add a migration
48 // from /home/chronos/u-<hash>/Downloads to current Download path.
49 // This just results in no-op when multi-profile is enabled.
48 bool MigratePathFromOldFormat(Profile* profile, 50 bool MigratePathFromOldFormat(Profile* profile,
49 const base::FilePath& old_path, 51 const base::FilePath& old_path,
50 base::FilePath* new_path); 52 base::FilePath* new_path);
51 53
52 // The canonical mount point name for "Downloads" folder. 54 // The canonical mount point name for "Downloads" folder.
53 std::string GetDownloadsMountPointName(Profile* profile); 55 std::string GetDownloadsMountPointName(Profile* profile);
54 56
55 } // namespace util 57 } // namespace util
56 } // namespace file_manager 58 } // namespace file_manager
57 59
58 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_PATH_UTIL_H_ 60 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_PATH_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/open_util.cc ('k') | chrome/browser/chromeos/file_manager/path_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698