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

Unified Diff: chrome/browser/printing/cloud_print/cloud_print_url.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
Index: chrome/browser/printing/cloud_print/cloud_print_url.cc
diff --git a/chrome/browser/printing/cloud_print/cloud_print_url.cc b/chrome/browser/printing/cloud_print/cloud_print_url.cc
index 76dbacf895ea1fb5d77c3e53d0f82760f547f722..e6aed2302fe2a119609fbad85f80f96a755bd6f2 100644
--- a/chrome/browser/printing/cloud_print/cloud_print_url.cc
+++ b/chrome/browser/printing/cloud_print/cloud_print_url.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/stringprintf.h"
#include "chrome/browser/google/google_util.h"
+#include "chrome/browser/prefs/pref_registry_syncable.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
@@ -26,16 +27,20 @@ const char kTestPageURL[] =
void CloudPrintURL::RegisterPreferences() {
DCHECK(profile_);
- PrefServiceSyncable* pref_service = profile_->GetPrefs();
+ PrefService* pref_service = profile_->GetPrefs();
+ // TODO(joi): Do all registration up front.
+ scoped_refptr<PrefRegistrySyncable> registry(
+ static_cast<PrefRegistrySyncable*>(
+ pref_service->DeprecatedGetPrefRegistry()));
if (!pref_service->FindPreference(prefs::kCloudPrintServiceURL)) {
- pref_service->RegisterStringPref(prefs::kCloudPrintServiceURL,
- kDefaultCloudPrintServiceURL,
- PrefServiceSyncable::UNSYNCABLE_PREF);
+ registry->RegisterStringPref(prefs::kCloudPrintServiceURL,
+ kDefaultCloudPrintServiceURL,
+ PrefRegistrySyncable::UNSYNCABLE_PREF);
}
if (!pref_service->FindPreference(prefs::kCloudPrintSigninURL)) {
- pref_service->RegisterStringPref(prefs::kCloudPrintSigninURL,
- kDefaultCloudPrintSigninURL,
- PrefServiceSyncable::UNSYNCABLE_PREF);
+ registry->RegisterStringPref(prefs::kCloudPrintSigninURL,
+ kDefaultCloudPrintSigninURL,
+ PrefRegistrySyncable::UNSYNCABLE_PREF);
}
}
« no previous file with comments | « chrome/browser/prefs/session_startup_pref_unittest.cc ('k') | chrome/browser/printing/print_dialog_cloud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698