| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 152   NO_PREFS = 0, | 152   NO_PREFS = 0, | 
| 153   DNS_PREFS = 1 << 0, | 153   DNS_PREFS = 1 << 0, | 
| 154   WINDOWS_PREFS = 1 << 1, | 154   WINDOWS_PREFS = 1 << 1, | 
| 155   GOOGLE_URL_TRACKER_PREFS = 1 << 2, | 155   GOOGLE_URL_TRACKER_PREFS = 1 << 2, | 
| 156 }; | 156 }; | 
| 157 | 157 | 
| 158 }  // namespace | 158 }  // namespace | 
| 159 | 159 | 
| 160 namespace chrome { | 160 namespace chrome { | 
| 161 | 161 | 
| 162 // TODO(joi): Do the work needed to remove the PrefService parameter, | 162 void RegisterLocalState(PrefRegistrySimple* registry) { | 
| 163 // i.e. to do all registration up front before a PrefService is even |  | 
| 164 // created. |  | 
| 165 void RegisterLocalState(PrefService* local_state, |  | 
| 166                         PrefRegistrySimple* registry) { |  | 
| 167   // Prefs in Local State. | 163   // Prefs in Local State. | 
| 168   registry->RegisterIntegerPref(prefs::kMultipleProfilePrefMigration, 0); | 164   registry->RegisterIntegerPref(prefs::kMultipleProfilePrefMigration, 0); | 
| 169 | 165 | 
| 170   // Please keep this list alphabetized. | 166   // Please keep this list alphabetized. | 
| 171   apps::RegisterPrefs(registry); | 167   apps::RegisterPrefs(registry); | 
| 172   browser_shutdown::RegisterPrefs(registry); | 168   browser_shutdown::RegisterPrefs(registry); | 
| 173   BrowserProcessImpl::RegisterPrefs(registry); | 169   BrowserProcessImpl::RegisterPrefs(registry); | 
| 174   chrome::RegisterScreenshotPrefs(registry); | 170   chrome::RegisterScreenshotPrefs(registry); | 
| 175   ExternalProtocolHandler::RegisterPrefs(registry); | 171   ExternalProtocolHandler::RegisterPrefs(registry); | 
| 176   FlagsUI::RegisterPrefs(registry); | 172   FlagsUI::RegisterPrefs(registry); | 
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 429     } | 425     } | 
| 430     local_state->ClearPref(prefs::kLastPromptedGoogleURL); | 426     local_state->ClearPref(prefs::kLastPromptedGoogleURL); | 
| 431 | 427 | 
| 432     current_version |= GOOGLE_URL_TRACKER_PREFS; | 428     current_version |= GOOGLE_URL_TRACKER_PREFS; | 
| 433     local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 429     local_state->SetInteger(prefs::kMultipleProfilePrefMigration, | 
| 434                             current_version); | 430                             current_version); | 
| 435   } | 431   } | 
| 436 } | 432 } | 
| 437 | 433 | 
| 438 }  // namespace chrome | 434 }  // namespace chrome | 
| OLD | NEW | 
|---|