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

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

Issue 10704143: Allow max_group = 0 to pass all groups. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « no previous file | chrome/browser/web_resource/notification_promo.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // Check if this promo notification is new based on start/end times, 57 // Check if this promo notification is new based on start/end times,
58 // and trigger events accordingly. 58 // and trigger events accordingly.
59 void CheckForNewNotification(); 59 void CheckForNewNotification();
60 60
61 // Actions on receiving a new promo notification. 61 // Actions on receiving a new promo notification.
62 void OnNewNotification(); 62 void OnNewNotification();
63 63
64 // Flush data members to prefs for storage. 64 // Flush data members to prefs for storage.
65 void WritePrefs(); 65 void WritePrefs();
66 66
67 // Tests group_ against max_group_.
68 // When max_group_ is 0, all groups pass.
69 bool ExceedsMaxGroup() const;
70
67 // Tests views_ against max_views_. 71 // Tests views_ against max_views_.
68 // When max_views_ is 0, we don't cap the number of views. 72 // When max_views_ is 0, we don't cap the number of views.
69 bool ExceedsMaxViews() const; 73 bool ExceedsMaxViews() const;
70 74
71 // True if this promo is not targeted to G+ users, or if this is a G+ user. 75 // True if this promo is not targeted to G+ users, or if this is a G+ user.
72 bool IsGPlusRequired() const; 76 bool IsGPlusRequired() const;
73 77
74 Profile* profile_; 78 Profile* profile_;
75 PrefService* prefs_; 79 PrefService* prefs_;
76 80
(...skipping 16 matching lines...) Expand all
93 bool closed_; 97 bool closed_;
94 98
95 bool gplus_required_; 99 bool gplus_required_;
96 100
97 bool new_notification_; 101 bool new_notification_;
98 102
99 DISALLOW_COPY_AND_ASSIGN(NotificationPromo); 103 DISALLOW_COPY_AND_ASSIGN(NotificationPromo);
100 }; 104 };
101 105
102 #endif // CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_ 106 #endif // CHROME_BROWSER_WEB_RESOURCE_NOTIFICATION_PROMO_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/web_resource/notification_promo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698