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

Unified Diff: chrome/browser/ui/browser_instant_controller.cc

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again; base::File changes conflicted. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/browser/ui/browser_ui_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_instant_controller.cc
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc
index ae5c0b083c4c0d607f1088da28cdebd472fb65fe..40d75cd824e6ae999ca478b125e4361fa563969a 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/browser_instant_controller.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/prefs/pref_registry_syncable.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/themes/theme_service.h"
@@ -73,11 +74,14 @@ bool BrowserInstantController::IsInstantEnabled(Profile* profile) {
profile->GetPrefs()->GetBoolean(GetInstantPrefName(profile));
}
-void BrowserInstantController::RegisterUserPrefs(PrefServiceSyncable* prefs) {
- prefs->RegisterBooleanPref(prefs::kInstantConfirmDialogShown, false,
- PrefServiceSyncable::SYNCABLE_PREF);
- prefs->RegisterBooleanPref(prefs::kInstantEnabled, false,
- PrefServiceSyncable::SYNCABLE_PREF);
+void BrowserInstantController::RegisterUserPrefs(
+ PrefService* prefs,
+ PrefRegistrySyncable* registry) {
+ // TODO(joi): Get rid of the need for PrefService param above.
+ registry->RegisterBooleanPref(prefs::kInstantConfirmDialogShown, false,
+ PrefRegistrySyncable::SYNCABLE_PREF);
+ registry->RegisterBooleanPref(prefs::kInstantEnabled, false,
+ PrefRegistrySyncable::SYNCABLE_PREF);
search::InstantExtendedDefault instant_extended_default_setting =
search::GetInstantExtendedDefaultSetting();
@@ -94,9 +98,9 @@ void BrowserInstantController::RegisterUserPrefs(PrefServiceSyncable* prefs) {
break;
}
- prefs->RegisterBooleanPref(prefs::kInstantExtendedEnabled,
- instant_extended_value,
- PrefServiceSyncable::SYNCABLE_PREF);
+ registry->RegisterBooleanPref(prefs::kInstantExtendedEnabled,
+ instant_extended_value,
+ PrefRegistrySyncable::SYNCABLE_PREF);
}
bool BrowserInstantController::MaybeSwapInInstantNTPContents(
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/browser/ui/browser_ui_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698