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

Unified Diff: chrome/browser/prefs/browser_prefs.cc

Issue 6247017: Revert 72153 - Remove user-related data from local_state and add to user_pre... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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/prefs/browser_prefs.h ('k') | chrome/browser/prefs/pref_service_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/browser_prefs.cc
===================================================================
--- chrome/browser/prefs/browser_prefs.cc (revision 72173)
+++ chrome/browser/prefs/browser_prefs.cc (working copy)
@@ -55,7 +55,6 @@
#include "chrome/browser/translate/translate_prefs.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/upgrade_detector.h"
-#include "chrome/common/pref_names.h"
#if defined(TOOLKIT_VIEWS) // TODO(port): whittle this down as we port
#include "chrome/browser/ui/views/browser_actions_container.h"
@@ -160,35 +159,4 @@
policy::ProfilePolicyContext::RegisterUserPrefs(user_prefs);
}
-void MigrateBrowserPrefs(PrefService* user_prefs, PrefService* local_state) {
- // Copy pref values which have been migrated to user_prefs from local_state,
- // or remove them from local_state outright, if copying is not required.
- int current_version =
- local_state->GetInteger(prefs::kMultipleProfilePrefMigration);
-
- if ((current_version & WINDOWS_PREFS) == 0) {
- // Migrate the devtools split location preference.
- local_state->RegisterIntegerPref(prefs::kDevToolsSplitLocation, -1);
- DCHECK(user_prefs->FindPreference(prefs::kDevToolsSplitLocation));
- if (local_state->HasPrefPath(prefs::kDevToolsSplitLocation)) {
- user_prefs->SetInteger(prefs::kDevToolsSplitLocation,
- local_state->GetInteger(prefs::kDevToolsSplitLocation));
- }
- local_state->ClearPref(prefs::kDevToolsSplitLocation);
-
- // Migrate the browser window placement preference.
- local_state->RegisterDictionaryPref(prefs::kBrowserWindowPlacement);
- DCHECK(user_prefs->FindPreference(prefs::kBrowserWindowPlacement));
- if (local_state->HasPrefPath(prefs::kBrowserWindowPlacement)) {
- user_prefs->Set(prefs::kBrowserWindowPlacement,
- *(local_state->FindPreference(prefs::kBrowserWindowPlacement)->
- GetValue()->DeepCopy()));
- }
- local_state->ClearPref(prefs::kBrowserWindowPlacement);
-
- local_state->SetInteger(prefs::kMultipleProfilePrefMigration,
- current_version | WINDOWS_PREFS);
- }
-}
-
} // namespace browser
« no previous file with comments | « chrome/browser/prefs/browser_prefs.h ('k') | chrome/browser/prefs/pref_service_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698