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

Unified Diff: chrome/browser/component_updater/recovery_component_installer.cc

Issue 11741003: Remove PrefServiceSimple, replacing it with PrefService and PrefRegistrySimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double registration in Chrome Frame test. 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
Index: chrome/browser/component_updater/recovery_component_installer.cc
diff --git a/chrome/browser/component_updater/recovery_component_installer.cc b/chrome/browser/component_updater/recovery_component_installer.cc
index 673a6cec2d4dd14cbdc9ba1a7d41d05854590338..3573549cb23be49a6cd6cf793e098c05cd7c0618 100644
--- a/chrome/browser/component_updater/recovery_component_installer.cc
+++ b/chrome/browser/component_updater/recovery_component_installer.cc
@@ -16,6 +16,7 @@
#include "base/string_util.h"
#include "base/values.h"
#include "chrome/browser/component_updater/component_updater_service.h"
+#include "chrome/browser/prefs/pref_registry_simple.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/pref_names.h"
@@ -61,12 +62,14 @@ class RecoveryComponentInstaller : public ComponentInstaller {
};
void RecoveryRegisterHelper(ComponentUpdateService* cus,
- PrefServiceSimple* prefs) {
+ PrefService* prefs) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// TODO(joi): Registrations for local state prefs shouldn't happen
// like this, they should be done via
// browser_prefs::RegisterLocalState.
- prefs->RegisterStringPref(prefs::kRecoveryComponentVersion, "0.0.0.0");
+ static_cast<PrefRegistrySimple*>(
+ prefs->DeprecatedGetPrefRegistry())->RegisterStringPref(
+ prefs::kRecoveryComponentVersion, "0.0.0.0");
Version version(prefs->GetString(prefs::kRecoveryComponentVersion));
if (!version.IsValid()) {
NOTREACHED();
@@ -134,7 +137,7 @@ bool RecoveryComponentInstaller::Install(base::DictionaryValue* manifest,
}
void RegisterRecoveryComponent(ComponentUpdateService* cus,
- PrefServiceSimple* prefs) {
+ PrefService* prefs) {
#if !defined(OS_CHROMEOS)
// We delay execute the registration because we are not required in
// the critical path during browser startup.
« no previous file with comments | « chrome/browser/component_updater/recovery_component_installer.h ('k') | chrome/browser/extensions/app_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698