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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/prefs/pref_registry_simple.h" | 10 #include "base/prefs/pref_registry_simple.h" |
11 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
12 #include "base/prefs/scoped_user_pref_update.h" | 12 #include "base/prefs/scoped_user_pref_update.h" |
13 #include "base/trace_event/trace_event.h" | 13 #include "base/trace_event/trace_event.h" |
14 #include "chrome/browser/about_flags.h" | 14 #include "chrome/browser/about_flags.h" |
15 #include "chrome/browser/accessibility/invert_bubble_prefs.h" | 15 #include "chrome/browser/accessibility/invert_bubble_prefs.h" |
16 #include "chrome/browser/autocomplete/zero_suggest_provider.h" | 16 #include "chrome/browser/autocomplete/zero_suggest_provider.h" |
17 #include "chrome/browser/browser_process_impl.h" | 17 #include "chrome/browser/browser_process_impl.h" |
18 #include "chrome/browser/browser_shutdown.h" | 18 #include "chrome/browser/browser_shutdown.h" |
19 #include "chrome/browser/chrome_content_browser_client.h" | 19 #include "chrome/browser/chrome_content_browser_client.h" |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 372 |
373 // Preferences registered only for migration (clearing or moving to a new key) | 373 // Preferences registered only for migration (clearing or moving to a new key) |
374 // go here. | 374 // go here. |
375 #if !defined(OS_ANDROID) | 375 #if !defined(OS_ANDROID) |
376 registry->RegisterDictionaryPref(kLegacyProfileResetPromptMemento); | 376 registry->RegisterDictionaryPref(kLegacyProfileResetPromptMemento); |
377 #endif // !defined(OS_ANDROID) | 377 #endif // !defined(OS_ANDROID) |
378 } | 378 } |
379 | 379 |
380 // Register prefs applicable to all profiles. | 380 // Register prefs applicable to all profiles. |
381 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { | 381 void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { |
382 TRACE_EVENT0("browser", "chrome::RegisterUserPrefs"); | 382 TRACE_EVENT0("browser", "chrome::RegisterProfilePrefs"); |
| 383 SCOPED_UMA_HISTOGRAM_TIMER("Settings.RegisterProfilePrefsTime"); |
383 // User prefs. Please keep this list alphabetized. | 384 // User prefs. Please keep this list alphabetized. |
384 autofill::AutofillManager::RegisterProfilePrefs(registry); | 385 autofill::AutofillManager::RegisterProfilePrefs(registry); |
385 bookmarks::RegisterProfilePrefs(registry); | 386 bookmarks::RegisterProfilePrefs(registry); |
386 sync_driver::SyncPrefs::RegisterProfilePrefs(registry); | 387 sync_driver::SyncPrefs::RegisterProfilePrefs(registry); |
387 ChromeContentBrowserClient::RegisterProfilePrefs(registry); | 388 ChromeContentBrowserClient::RegisterProfilePrefs(registry); |
388 ChromeVersionService::RegisterProfilePrefs(registry); | 389 ChromeVersionService::RegisterProfilePrefs(registry); |
389 chrome_browser_net::HttpServerPropertiesManagerFactory::RegisterProfilePrefs( | 390 chrome_browser_net::HttpServerPropertiesManagerFactory::RegisterProfilePrefs( |
390 registry); | 391 registry); |
391 chrome_browser_net::Predictor::RegisterProfilePrefs(registry); | 392 chrome_browser_net::Predictor::RegisterProfilePrefs(registry); |
392 chrome_browser_net::RegisterPredictionOptionsProfilePrefs(registry); | 393 chrome_browser_net::RegisterPredictionOptionsProfilePrefs(registry); |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 host_zoom_dictionary, false /* sanitize_partition_host_zoom_levels */); | 674 host_zoom_dictionary, false /* sanitize_partition_host_zoom_levels */); |
674 | 675 |
675 // We're done migrating the profile per-host zoom level values, so we clear | 676 // We're done migrating the profile per-host zoom level values, so we clear |
676 // them all. | 677 // them all. |
677 DictionaryPrefUpdate host_zoom_dictionary_update( | 678 DictionaryPrefUpdate host_zoom_dictionary_update( |
678 prefs, prefs::kPerHostZoomLevelsDeprecated); | 679 prefs, prefs::kPerHostZoomLevelsDeprecated); |
679 host_zoom_dictionary_update->Clear(); | 680 host_zoom_dictionary_update->Clear(); |
680 } | 681 } |
681 | 682 |
682 } // namespace chrome | 683 } // namespace chrome |
OLD | NEW |