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

Unified Diff: chrome/browser/prefs/pref_metrics_service.cc

Issue 1326353002: Remove dependency of PrefSyncableService on Profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_model_associator
Patch Set: Fixing ChromeOS and Linux compilation Created 5 years, 3 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/prefs/pref_metrics_service.cc
diff --git a/chrome/browser/prefs/pref_metrics_service.cc b/chrome/browser/prefs/pref_metrics_service.cc
index a3d211769f7e695c1641befdfc8608e5709b9b81..1caea5461efe6394d06a727200860a0c43c388a1 100644
--- a/chrome/browser/prefs/pref_metrics_service.cc
+++ b/chrome/browser/prefs/pref_metrics_service.cc
@@ -12,6 +12,7 @@
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
+#include "chrome/browser/prefs/pref_service_syncable_util.h"
#include "chrome/browser/prefs/session_startup_pref.h"
#include "chrome/browser/prefs/synced_pref_change_registrar.h"
#include "chrome/browser/profiles/incognito_helpers.h"
@@ -54,7 +55,7 @@ PrefMetricsService::PrefMetricsService(Profile* profile)
weak_factory_(this) {
RecordLaunchPrefs();
- PrefServiceSyncable* prefs = PrefServiceSyncable::FromProfile(profile_);
+ PrefServiceSyncable* prefs = PrefServiceSyncableFromProfile(profile_);
synced_pref_change_registrar_.reset(new SyncedPrefChangeRegistrar(prefs));
RegisterSyncedPrefObservers();
@@ -176,7 +177,7 @@ void PrefMetricsService::OnPrefChanged(
const LogHistogramValueCallback& callback,
const std::string& path,
bool from_sync) {
- PrefServiceSyncable* prefs = PrefServiceSyncable::FromProfile(profile_);
+ PrefServiceSyncable* prefs = PrefServiceSyncableFromProfile(profile_);
const PrefService::Preference* pref = prefs->FindPreference(path.c_str());
DCHECK(pref);
std::string source_name(
« no previous file with comments | « chrome/browser/notifications/extension_welcome_notification_unittest.cc ('k') | chrome/browser/prefs/pref_service_syncable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698