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

Unified Diff: chrome/browser/notifications/extension_welcome_notification.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/notifications/extension_welcome_notification.cc
diff --git a/chrome/browser/notifications/extension_welcome_notification.cc b/chrome/browser/notifications/extension_welcome_notification.cc
index d974145eb92ab67a5d782091e3a75acc1ac08cc7..b138c7ac4cb48fce02330f39ddf8705963473627 100644
--- a/chrome/browser/notifications/extension_welcome_notification.cc
+++ b/chrome/browser/notifications/extension_welcome_notification.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
+#include "chrome/browser/prefs/pref_service_syncable_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/common/pref_names.h"
@@ -164,7 +165,7 @@ ExtensionWelcomeNotification* ExtensionWelcomeNotification::Create(
ExtensionWelcomeNotification::~ExtensionWelcomeNotification() {
if (delayed_notification_) {
delayed_notification_.reset();
- PrefServiceSyncable::FromProfile(profile_)->RemoveObserver(this);
+ PrefServiceSyncableFromProfile(profile_)->RemoveObserver(this);
} else {
HideWelcomeNotification();
}
@@ -173,7 +174,7 @@ ExtensionWelcomeNotification::~ExtensionWelcomeNotification() {
void ExtensionWelcomeNotification::OnIsSyncingChanged() {
DCHECK(delayed_notification_);
PrefServiceSyncable* const pref_service_syncable =
- PrefServiceSyncable::FromProfile(profile_);
+ PrefServiceSyncableFromProfile(profile_);
if (pref_service_syncable->IsSyncing()) {
pref_service_syncable->RemoveObserver(this);
scoped_ptr<Notification> previous_notification(
@@ -186,7 +187,7 @@ void ExtensionWelcomeNotification::ShowWelcomeNotificationIfNecessary(
const Notification& notification) {
if ((notification.notifier_id() == notifier_id_) && !delayed_notification_) {
PrefServiceSyncable* const pref_service_syncable =
- PrefServiceSyncable::FromProfile(profile_);
+ PrefServiceSyncableFromProfile(profile_);
if (pref_service_syncable->IsSyncing()) {
PrefService* const pref_service = profile_->GetPrefs();
if (!UserHasDismissedWelcomeNotification()) {

Powered by Google App Engine
This is Rietveld 408576698