| 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/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "chrome/browser/about_flags.h" | 10 #include "chrome/browser/about_flags.h" |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 *(pref->GetValue())); | 431 *(pref->GetValue())); |
| 432 } | 432 } |
| 433 local_state->ClearPref(prefs::kBrowserWindowPlacement); | 433 local_state->ClearPref(prefs::kBrowserWindowPlacement); |
| 434 | 434 |
| 435 current_version |= WINDOWS_PREFS; | 435 current_version |= WINDOWS_PREFS; |
| 436 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 436 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
| 437 current_version); | 437 current_version); |
| 438 } | 438 } |
| 439 | 439 |
| 440 if (!(current_version & GOOGLE_URL_TRACKER_PREFS)) { | 440 if (!(current_version & GOOGLE_URL_TRACKER_PREFS)) { |
| 441 GoogleURLTrackerFactory::GetInstance()->RegisterUserPrefsOnProfile(profile); | 441 GoogleURLTrackerFactory::GetInstance()->RegisterUserPrefsOnBrowserContext( |
| 442 profile); |
| 442 registry->RegisterStringPref(prefs::kLastKnownGoogleURL, | 443 registry->RegisterStringPref(prefs::kLastKnownGoogleURL, |
| 443 GoogleURLTracker::kDefaultGoogleHomepage); | 444 GoogleURLTracker::kDefaultGoogleHomepage); |
| 444 if (local_state->HasPrefPath(prefs::kLastKnownGoogleURL)) { | 445 if (local_state->HasPrefPath(prefs::kLastKnownGoogleURL)) { |
| 445 user_prefs->SetString(prefs::kLastKnownGoogleURL, | 446 user_prefs->SetString(prefs::kLastKnownGoogleURL, |
| 446 local_state->GetString(prefs::kLastKnownGoogleURL)); | 447 local_state->GetString(prefs::kLastKnownGoogleURL)); |
| 447 } | 448 } |
| 448 local_state->ClearPref(prefs::kLastKnownGoogleURL); | 449 local_state->ClearPref(prefs::kLastKnownGoogleURL); |
| 449 | 450 |
| 450 registry->RegisterStringPref(prefs::kLastPromptedGoogleURL, | 451 registry->RegisterStringPref(prefs::kLastPromptedGoogleURL, |
| 451 std::string()); | 452 std::string()); |
| 452 if (local_state->HasPrefPath(prefs::kLastPromptedGoogleURL)) { | 453 if (local_state->HasPrefPath(prefs::kLastPromptedGoogleURL)) { |
| 453 user_prefs->SetString( | 454 user_prefs->SetString( |
| 454 prefs::kLastPromptedGoogleURL, | 455 prefs::kLastPromptedGoogleURL, |
| 455 local_state->GetString(prefs::kLastPromptedGoogleURL)); | 456 local_state->GetString(prefs::kLastPromptedGoogleURL)); |
| 456 } | 457 } |
| 457 local_state->ClearPref(prefs::kLastPromptedGoogleURL); | 458 local_state->ClearPref(prefs::kLastPromptedGoogleURL); |
| 458 | 459 |
| 459 current_version |= GOOGLE_URL_TRACKER_PREFS; | 460 current_version |= GOOGLE_URL_TRACKER_PREFS; |
| 460 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 461 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, |
| 461 current_version); | 462 current_version); |
| 462 } | 463 } |
| 463 } | 464 } |
| 464 | 465 |
| 465 } // namespace chrome | 466 } // namespace chrome |
| OLD | NEW |