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

Unified Diff: chrome/browser/web_resource/promo_resource_service.h

Issue 11689004: Move PromoResourceService from Profile to BrowserProcessImpl/local_state(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 12 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/web_resource/promo_resource_service.h
diff --git a/chrome/browser/web_resource/promo_resource_service.h b/chrome/browser/web_resource/promo_resource_service.h
index e55e59a0ac478b99b5f1aa4340ab5051129b41c1..485c57b3f2444d1c7f126196f1076c1964537dc2 100644
--- a/chrome/browser/web_resource/promo_resource_service.h
+++ b/chrome/browser/web_resource/promo_resource_service.h
@@ -15,9 +15,9 @@ class DictionaryValue;
}
class NotificationPromo;
+class PrefService;
class PrefServiceSimple;
class PrefServiceSyncable;
-class Profile;
// A PromoResourceService fetches data from a web resource server to be used to
// dynamically change the appearance of the New Tab Page. For example, it has
@@ -26,14 +26,18 @@ class Profile;
class PromoResourceService : public WebResourceService {
public:
static void RegisterPrefs(PrefServiceSimple* local_state);
-
static void RegisterUserPrefs(PrefServiceSyncable* prefs);
- explicit PromoResourceService(Profile* profile);
+ PromoResourceService();
private:
virtual ~PromoResourceService();
+ // For testing.
+ PromoResourceService(PrefService* prefs);
+ void ScheduleNotificationOnInitForTesting(PrefService* prefs);
+ friend class PromoResourceServiceTest;
Robert Sesek 2013/01/03 21:40:10 friends come first
Dan Beam 2013/01/03 22:47:38 Done. (not needed any more)
+
// Schedule a notification that a web resource is either going to become
// available or be no longer valid.
void ScheduleNotification(const NotificationPromo& notification_promo);
@@ -55,9 +59,6 @@ class PromoResourceService : public WebResourceService {
// WebResourceService override to process the parsed information.
virtual void Unpack(const base::DictionaryValue& parsed_json) OVERRIDE;
- // The profile this service belongs to.
- Profile* profile_;
-
// Allows the creation of tasks to send a notification.
// This allows the PromoResourceService to notify the New Tab Page immediately
// when a new web resource should be shown or removed.

Powered by Google App Engine
This is Rietveld 408576698