| Index: chrome/browser/chromeos/preferences.cc
|
| diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc
|
| index 791b79ca318851866acb2d7fbda9992093ab01b7..4f40880544aca37365b2c57aced7f3a73664f875 100644
|
| --- a/chrome/browser/chromeos/preferences.cc
|
| +++ b/chrome/browser/chromeos/preferences.cc
|
| @@ -368,6 +368,8 @@ void Preferences::InitUserPrefs(PrefServiceSyncable* prefs) {
|
| prefs, callback);
|
| download_default_directory_.Init(prefs::kDownloadDefaultDirectory,
|
| prefs, callback);
|
| + select_file_last_directory_.Init(prefs::kSelectFileLastDirectory,
|
| + prefs, callback);
|
| primary_mouse_button_right_.Init(prefs::kPrimaryMouseButtonRight,
|
| prefs, callback);
|
| preferred_languages_.Init(prefs::kLanguagePreferredLanguages,
|
| @@ -581,6 +583,7 @@ void Preferences::NotifyPrefChanged(const std::string* pref_name) {
|
| }
|
| if (!pref_name || *pref_name == prefs::kDownloadDefaultDirectory) {
|
| const base::FilePath pref_path = download_default_directory_.GetValue();
|
| + // TODO(haruki): Remove this when migration completes. crbug.com/229304.
|
| if (drive::util::NeedsNamespaceMigration(pref_path)) {
|
| prefs_->SetFilePath(prefs::kDownloadDefaultDirectory,
|
| drive::util::ConvertToMyDriveNamespace(pref_path));
|
| @@ -597,6 +600,16 @@ void Preferences::NotifyPrefChanged(const std::string* pref_name) {
|
| "FileBrowser.DownloadDestination.IsGoogleDrive.Started",
|
| default_download_to_drive);
|
| }
|
| + if (!pref_name || *pref_name == prefs::kSelectFileLastDirectory) {
|
| + const base::FilePath pref_path = select_file_last_directory_.GetValue();
|
| + // This pref can contain a Drive path, which needs to be updated due to
|
| + // namespaces introduced by crbug.com/174233.
|
| + // TODO(haruki): Remove this when migration completes. crbug.com/229304.
|
| + if (drive::util::NeedsNamespaceMigration(pref_path)) {
|
| + prefs_->SetFilePath(prefs::kSelectFileLastDirectory,
|
| + drive::util::ConvertToMyDriveNamespace(pref_path));
|
| + }
|
| + }
|
|
|
| if (!pref_name || *pref_name == prefs::kLanguagePreferredLanguages) {
|
| // Unlike kLanguagePreloadEngines and some other input method
|
|
|