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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 registry->RegisterListPref(prefs::kDnsHostReferralList); | 512 registry->RegisterListPref(prefs::kDnsHostReferralList); |
513 local_state->ClearPref(prefs::kDnsHostReferralList); | 513 local_state->ClearPref(prefs::kDnsHostReferralList); |
514 | 514 |
515 current_version |= DNS_PREFS; | 515 current_version |= DNS_PREFS; |
516 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 516 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
517 current_version); | 517 current_version); |
518 } | 518 } |
519 | 519 |
520 PrefService* user_prefs = profile->GetPrefs(); | 520 PrefService* user_prefs = profile->GetPrefs(); |
521 if (!(current_version & WINDOWS_PREFS)) { | 521 if (!(current_version & WINDOWS_PREFS)) { |
522 registry->RegisterIntegerPref(prefs::kDevToolsHSplitLocation, -1); | |
523 if (local_state->HasPrefPath(prefs::kDevToolsHSplitLocation)) { | |
524 user_prefs->SetInteger( | |
525 prefs::kDevToolsHSplitLocation, | |
526 local_state->GetInteger(prefs::kDevToolsHSplitLocation)); | |
527 } | |
528 local_state->ClearPref(prefs::kDevToolsHSplitLocation); | |
529 | |
530 registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); | 522 registry->RegisterDictionaryPref(prefs::kBrowserWindowPlacement); |
531 if (local_state->HasPrefPath(prefs::kBrowserWindowPlacement)) { | 523 if (local_state->HasPrefPath(prefs::kBrowserWindowPlacement)) { |
532 const PrefService::Preference* pref = | 524 const PrefService::Preference* pref = |
533 local_state->FindPreference(prefs::kBrowserWindowPlacement); | 525 local_state->FindPreference(prefs::kBrowserWindowPlacement); |
534 DCHECK(pref); | 526 DCHECK(pref); |
535 user_prefs->Set(prefs::kBrowserWindowPlacement, | 527 user_prefs->Set(prefs::kBrowserWindowPlacement, |
536 *(pref->GetValue())); | 528 *(pref->GetValue())); |
537 } | 529 } |
538 local_state->ClearPref(prefs::kBrowserWindowPlacement); | 530 local_state->ClearPref(prefs::kBrowserWindowPlacement); |
539 | 531 |
(...skipping 20 matching lines...) Expand all Loading... |
560 } | 552 } |
561 local_state->ClearPref(prefs::kLastPromptedGoogleURL); | 553 local_state->ClearPref(prefs::kLastPromptedGoogleURL); |
562 | 554 |
563 current_version |= GOOGLE_URL_TRACKER_PREFS; | 555 current_version |= GOOGLE_URL_TRACKER_PREFS; |
564 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 556 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
565 current_version); | 557 current_version); |
566 } | 558 } |
567 } | 559 } |
568 | 560 |
569 } // namespace chrome | 561 } // namespace chrome |
OLD | NEW |