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

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

Issue 12320064: Fix prefs registration in promo code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR Created 7 years, 9 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_NOTIFICATION_PROMO_H_ 5 #ifndef CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_
6 #define CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_ 6 #define CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool new_notification() const { return new_notification_; } 60 bool new_notification() const { return new_notification_; }
61 61
62 const std::string& promo_text() const { return promo_text_; } 62 const std::string& promo_text() const { return promo_text_; }
63 PromoType promo_type() const { return promo_type_; } 63 PromoType promo_type() const { return promo_type_; }
64 const base::DictionaryValue* promo_payload() const { 64 const base::DictionaryValue* promo_payload() const {
65 return promo_payload_.get(); 65 return promo_payload_.get();
66 } 66 }
67 67
68 // Register preferences. 68 // Register preferences.
69 static void RegisterPrefs(PrefRegistrySimple* registry); 69 static void RegisterPrefs(PrefRegistrySimple* registry);
70 static void RegisterUserPrefs(PrefService* prefs, 70 static void RegisterUserPrefs(PrefRegistrySyncable* registry);
71 PrefRegistrySyncable* registry); 71 static void MigrateUserPrefs(PrefService* user_prefs);
72 72
73 private: 73 private:
74 // For testing. 74 // For testing.
75 friend class NotificationPromoTest; 75 friend class NotificationPromoTest;
76 76
77 // Check if this promo notification is new based on start/end times, 77 // Check if this promo notification is new based on start/end times,
78 // and trigger events accordingly. 78 // and trigger events accordingly.
79 void CheckForNewNotification(); 79 void CheckForNewNotification();
80 80
81 // Actions on receiving a new promo notification. 81 // Actions on receiving a new promo notification.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 int group_; 115 int group_;
116 int views_; 116 int views_;
117 bool closed_; 117 bool closed_;
118 118
119 bool new_notification_; 119 bool new_notification_;
120 120
121 DISALLOW_COPY_AND_ASSIGN(NotificationPromo); 121 DISALLOW_COPY_AND_ASSIGN(NotificationPromo);
122 }; 122 };
123 123
124 #endif // CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_ 124 #endif // CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/web_resource/notification_promo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698