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

Side by Side Diff: chrome/browser/web_resource/promo_resource_service.h

Issue 18199003: Allow Chrome OS login profile to have different default pref values (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_
6 #define CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_ 6 #define CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 11 matching lines...) Expand all
22 class PrefRegistrySyncable; 22 class PrefRegistrySyncable;
23 } 23 }
24 24
25 // A PromoResourceService fetches data from a web resource server to be used to 25 // A PromoResourceService fetches data from a web resource server to be used to
26 // dynamically change the appearance of the New Tab Page. For example, it has 26 // dynamically change the appearance of the New Tab Page. For example, it has
27 // been used to fetch "tips" to be displayed on the NTP, or to display 27 // been used to fetch "tips" to be displayed on the NTP, or to display
28 // promotional messages to certain groups of Chrome users. 28 // promotional messages to certain groups of Chrome users.
29 class PromoResourceService : public WebResourceService { 29 class PromoResourceService : public WebResourceService {
30 public: 30 public:
31 static void RegisterPrefs(PrefRegistrySimple* registry); 31 static void RegisterPrefs(PrefRegistrySimple* registry);
32 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); 32 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
33 static void MigrateUserPrefs(PrefService* user_prefs); 33 static void MigrateUserPrefs(PrefService* user_prefs);
34 34
35 PromoResourceService(); 35 PromoResourceService();
36 36
37 private: 37 private:
38 virtual ~PromoResourceService(); 38 virtual ~PromoResourceService();
39 39
40 // Schedule a notification that a web resource is either going to become 40 // Schedule a notification that a web resource is either going to become
41 // available or be no longer valid. 41 // available or be no longer valid.
42 void ScheduleNotification(const NotificationPromo& notification_promo); 42 void ScheduleNotification(const NotificationPromo& notification_promo);
(...skipping 17 matching lines...) Expand all
60 60
61 // Allows the creation of tasks to send a notification. 61 // Allows the creation of tasks to send a notification.
62 // This allows the PromoResourceService to notify the New Tab Page immediately 62 // This allows the PromoResourceService to notify the New Tab Page immediately
63 // when a new web resource should be shown or removed. 63 // when a new web resource should be shown or removed.
64 base::WeakPtrFactory<PromoResourceService> weak_ptr_factory_; 64 base::WeakPtrFactory<PromoResourceService> weak_ptr_factory_;
65 65
66 DISALLOW_COPY_AND_ASSIGN(PromoResourceService); 66 DISALLOW_COPY_AND_ASSIGN(PromoResourceService);
67 }; 67 };
68 68
69 #endif // CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_ 69 #endif // CHROME_BROWSER_WEB_RESOURCE_PROMO_RESOURCE_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/web_resource/notification_promo.cc ('k') | chrome/browser/web_resource/promo_resource_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698