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

Unified Diff: chrome/browser/chromeos/preferences.cc

Issue 13892002: Apply the namespace migration for "selectfile.last_directory" user-pref as well. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « chrome/browser/chromeos/preferences.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/preferences.cc
diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc
index 791b79ca318851866acb2d7fbda9992093ab01b7..2d9c54d6381759c6a879f5e8c992bb618f8cd5fb 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,
@@ -597,6 +599,13 @@ 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();
+ if (drive::util::NeedsNamespaceMigration(pref_path)) {
achuithb 2013/04/09 06:02:35 Any chance we could add a comment here explaining
Haruki Sato 2013/04/09 07:43:12 Added a TODO and a link to a bug. We'll track it a
+ prefs_->SetFilePath(prefs::kSelectFileLastDirectory,
+ drive::util::ConvertToMyDriveNamespace(pref_path));
+ }
+ }
if (!pref_name || *pref_name == prefs::kLanguagePreferredLanguages) {
// Unlike kLanguagePreloadEngines and some other input method
« no previous file with comments | « chrome/browser/chromeos/preferences.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698