Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: chrome/browser/prefs/browser_prefs.cc

Issue 6542013: Get rid of browser_prefs::RegisterAllPrefs() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix metrics_log_unittest.cc Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/about_flags.h" 7 #include "chrome/browser/about_flags.h"
8 #include "chrome/browser/autofill/autofill_manager.h" 8 #include "chrome/browser/autofill/autofill_manager.h"
9 #include "chrome/browser/background_contents_service.h" 9 #include "chrome/browser/background_contents_service.h"
10 #include "chrome/browser/background_mode_manager.h" 10 #include "chrome/browser/background_mode_manager.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "chrome/browser/chromeos/login/signed_settings_temp_storage.h" 70 #include "chrome/browser/chromeos/login/signed_settings_temp_storage.h"
71 #include "chrome/browser/chromeos/login/user_manager.h" 71 #include "chrome/browser/chromeos/login/user_manager.h"
72 #include "chrome/browser/chromeos/login/wizard_controller.h" 72 #include "chrome/browser/chromeos/login/wizard_controller.h"
73 #include "chrome/browser/chromeos/preferences.h" 73 #include "chrome/browser/chromeos/preferences.h"
74 #include "chrome/browser/chromeos/status/input_method_menu.h" 74 #include "chrome/browser/chromeos/status/input_method_menu.h"
75 #include "chrome/browser/chromeos/user_cros_settings_provider.h" 75 #include "chrome/browser/chromeos/user_cros_settings_provider.h"
76 #endif 76 #endif
77 77
78 namespace browser { 78 namespace browser {
79 79
80 void RegisterAllPrefs(PrefService* user_prefs, PrefService* local_state) {
81 RegisterLocalState(local_state);
82 RegisterUserPrefs(user_prefs);
83 }
84
85 void RegisterLocalState(PrefService* local_state) { 80 void RegisterLocalState(PrefService* local_state) {
86 // Prefs in Local State 81 // Prefs in Local State
87 Browser::RegisterPrefs(local_state); 82 Browser::RegisterPrefs(local_state);
88 FlagsUI::RegisterPrefs(local_state); 83 FlagsUI::RegisterPrefs(local_state);
89 WebCacheManager::RegisterPrefs(local_state); 84 WebCacheManager::RegisterPrefs(local_state);
90 ExternalProtocolHandler::RegisterPrefs(local_state); 85 ExternalProtocolHandler::RegisterPrefs(local_state);
91 GoogleURLTracker::RegisterPrefs(local_state); 86 GoogleURLTracker::RegisterPrefs(local_state);
92 IntranetRedirectDetector::RegisterPrefs(local_state); 87 IntranetRedirectDetector::RegisterPrefs(local_state);
93 KeywordEditorController::RegisterPrefs(local_state); 88 KeywordEditorController::RegisterPrefs(local_state);
94 MetricsLog::RegisterPrefs(local_state); 89 MetricsLog::RegisterPrefs(local_state);
95 MetricsService::RegisterPrefs(local_state); 90 MetricsService::RegisterPrefs(local_state);
96 SafeBrowsingService::RegisterPrefs(local_state); 91 SafeBrowsingService::RegisterPrefs(local_state);
97 browser_shutdown::RegisterPrefs(local_state); 92 browser_shutdown::RegisterPrefs(local_state);
98 #if defined(TOOLKIT_VIEWS) 93 #if defined(TOOLKIT_VIEWS)
99 BrowserView::RegisterBrowserViewPrefs(local_state); 94 BrowserView::RegisterBrowserViewPrefs(local_state);
100 #endif 95 #endif
101 UpgradeDetector::RegisterPrefs(local_state); 96 UpgradeDetector::RegisterPrefs(local_state);
102 TaskManager::RegisterPrefs(local_state); 97 TaskManager::RegisterPrefs(local_state);
103 geolocation::RegisterPrefs(local_state); 98 geolocation::RegisterPrefs(local_state);
104 AutoFillManager::RegisterBrowserPrefs(local_state); 99 AutoFillManager::RegisterBrowserPrefs(local_state);
105 BackgroundPageTracker::RegisterPrefs(local_state); 100 BackgroundPageTracker::RegisterPrefs(local_state);
106 NotificationUIManager::RegisterPrefs(local_state); 101 NotificationUIManager::RegisterPrefs(local_state);
102 PrefProxyConfigService::RegisterPrefs(local_state);
107 #if defined(OS_CHROMEOS) 103 #if defined(OS_CHROMEOS)
108 chromeos::AudioMixerAlsa::RegisterPrefs(local_state); 104 chromeos::AudioMixerAlsa::RegisterPrefs(local_state);
109 chromeos::UserManager::RegisterPrefs(local_state); 105 chromeos::UserManager::RegisterPrefs(local_state);
110 chromeos::UserCrosSettingsProvider::RegisterPrefs(local_state); 106 chromeos::UserCrosSettingsProvider::RegisterPrefs(local_state);
111 WizardController::RegisterPrefs(local_state); 107 WizardController::RegisterPrefs(local_state);
112 chromeos::InputMethodMenu::RegisterPrefs(local_state); 108 chromeos::InputMethodMenu::RegisterPrefs(local_state);
113 chromeos::ApplyServicesCustomization::RegisterPrefs(local_state); 109 chromeos::ApplyServicesCustomization::RegisterPrefs(local_state);
114 chromeos::SignedSettingsTempStorage::RegisterPrefs(local_state); 110 chromeos::SignedSettingsTempStorage::RegisterPrefs(local_state);
115 #endif 111 #endif
116 } 112 }
(...skipping 15 matching lines...) Expand all
132 PluginsUI::RegisterUserPrefs(user_prefs); 128 PluginsUI::RegisterUserPrefs(user_prefs);
133 ProfileImpl::RegisterUserPrefs(user_prefs); 129 ProfileImpl::RegisterUserPrefs(user_prefs);
134 HostContentSettingsMap::RegisterUserPrefs(user_prefs); 130 HostContentSettingsMap::RegisterUserPrefs(user_prefs);
135 HostZoomMap::RegisterUserPrefs(user_prefs); 131 HostZoomMap::RegisterUserPrefs(user_prefs);
136 DevToolsManager::RegisterUserPrefs(user_prefs); 132 DevToolsManager::RegisterUserPrefs(user_prefs);
137 PinnedTabCodec::RegisterUserPrefs(user_prefs); 133 PinnedTabCodec::RegisterUserPrefs(user_prefs);
138 ExtensionPrefs::RegisterUserPrefs(user_prefs); 134 ExtensionPrefs::RegisterUserPrefs(user_prefs);
139 GeolocationContentSettingsMap::RegisterUserPrefs(user_prefs); 135 GeolocationContentSettingsMap::RegisterUserPrefs(user_prefs);
140 TranslatePrefs::RegisterUserPrefs(user_prefs); 136 TranslatePrefs::RegisterUserPrefs(user_prefs);
141 DesktopNotificationService::RegisterUserPrefs(user_prefs); 137 DesktopNotificationService::RegisterUserPrefs(user_prefs);
142 PrefProxyConfigService::RegisterUserPrefs(user_prefs); 138 PrefProxyConfigService::RegisterPrefs(user_prefs);
143 #if defined(TOOLKIT_VIEWS) 139 #if defined(TOOLKIT_VIEWS)
144 BrowserActionsContainer::RegisterUserPrefs(user_prefs); 140 BrowserActionsContainer::RegisterUserPrefs(user_prefs);
145 #elif defined(TOOLKIT_GTK) 141 #elif defined(TOOLKIT_GTK)
146 BrowserWindowGtk::RegisterUserPrefs(user_prefs); 142 BrowserWindowGtk::RegisterUserPrefs(user_prefs);
147 #endif 143 #endif
148 #if defined(OS_CHROMEOS) 144 #if defined(OS_CHROMEOS)
149 chromeos::Preferences::RegisterUserPrefs(user_prefs); 145 chromeos::Preferences::RegisterUserPrefs(user_prefs);
150 #endif 146 #endif
151 BackgroundContentsService::RegisterUserPrefs(user_prefs); 147 BackgroundContentsService::RegisterUserPrefs(user_prefs);
152 SigninManager::RegisterUserPrefs(user_prefs); 148 SigninManager::RegisterUserPrefs(user_prefs);
(...skipping 28 matching lines...) Expand all
181 GetValue())); 177 GetValue()));
182 } 178 }
183 local_state->ClearPref(prefs::kBrowserWindowPlacement); 179 local_state->ClearPref(prefs::kBrowserWindowPlacement);
184 180
185 local_state->SetInteger(prefs::kMultipleProfilePrefMigration, 181 local_state->SetInteger(prefs::kMultipleProfilePrefMigration,
186 current_version | WINDOWS_PREFS); 182 current_version | WINDOWS_PREFS);
187 } 183 }
188 } 184 }
189 185
190 } // namespace browser 186 } // namespace browser
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698