| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/prefs/browser_prefs.h" | 5 #include "chrome/browser/prefs/browser_prefs.h" |
| 6 | 6 |
| 7 #include "apps/prefs.h" | 7 #include "apps/prefs.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/prefs/pref_registry_simple.h" | 9 #include "base/prefs/pref_registry_simple.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 registry->RegisterListPref(prefs::kDnsHostReferralList); | 507 registry->RegisterListPref(prefs::kDnsHostReferralList); |
| 508 local_state->ClearPref(prefs::kDnsHostReferralList); | 508 local_state->ClearPref(prefs::kDnsHostReferralList); |
| 509 | 509 |
| 510 current_version |= DNS_PREFS; | 510 current_version |= DNS_PREFS; |
| 511 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 511 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
| 512 current_version); | 512 current_version); |
| 513 } | 513 } |
| 514 | 514 |
| 515 PrefService* user_prefs = profile->GetPrefs(); | 515 PrefService* user_prefs = profile->GetPrefs(); |
| 516 if (!(current_version & WINDOWS_PREFS)) { | 516 if (!(current_version & WINDOWS_PREFS)) { |
| 517 registry->RegisterIntegerPref(prefs::kDevToolsHSplitLocation, -1); | |
| 518 if (local_state->HasPrefPath(prefs::kDevToolsHSplitLocation)) { | |
| 519 user_prefs->SetInteger( | |
| 520 prefs::kDevToolsHSplitLocation, | |
| 521 local_state->GetInteger(prefs::kDevToolsHSplitLocation)); | |
| 522 } | |
| 523 local_state->ClearPref(prefs::kDevToolsHSplitLocation); | |
| 524 | |
| 525 registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); | 517 registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); |
| 526 if (local_state->HasPrefPath(prefs::kBrowserWindowPlacement)) { | 518 if (local_state->HasPrefPath(prefs::kBrowserWindowPlacement)) { |
| 527 const PrefService::Preference* pref = | 519 const PrefService::Preference* pref = |
| 528 local_state->FindPreference(prefs::kBrowserWindowPlacement); | 520 local_state->FindPreference(prefs::kBrowserWindowPlacement); |
| 529 DCHECK(pref); | 521 DCHECK(pref); |
| 530 user_prefs->Set(prefs::kBrowserWindowPlacement, | 522 user_prefs->Set(prefs::kBrowserWindowPlacement, |
| 531 *(pref->GetValue())); | 523 *(pref->GetValue())); |
| 532 } | 524 } |
| 533 local_state->ClearPref(prefs::kBrowserWindowPlacement); | 525 local_state->ClearPref(prefs::kBrowserWindowPlacement); |
| 534 | 526 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 557 } | 549 } |
| 558 local_state->ClearPref(prefs::kLastPromptedGoogleURL); | 550 local_state->ClearPref(prefs::kLastPromptedGoogleURL); |
| 559 | 551 |
| 560 current_version |= GOOGLE_URL_TRACKER_PREFS; | 552 current_version |= GOOGLE_URL_TRACKER_PREFS; |
| 561 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 553 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
| 562 current_version); | 554 current_version); |
| 563 } | 555 } |
| 564 } | 556 } |
| 565 | 557 |
| 566 } // namespace chrome | 558 } // namespace chrome |
| OLD | NEW |