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

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

Issue 7655008: promo_resource_service fixes/cleanup for promos. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
===================================================================
--- chrome/browser/web_resource/promo_resource_service.h (revision 97318)
+++ chrome/browser/web_resource/promo_resource_service.h (working copy)
@@ -12,15 +12,6 @@
#include "chrome/common/chrome_version_info.h"
class Profile;
-
-namespace PromoResourceServiceUtil {
-
-// Certain promotions should only be shown to certain classes of users. This
-// function will change to reflect each kind of promotion.
-bool CanShowPromo(Profile* profile);
-
-} // namespace PromoResourceServiceUtil
-
class PrefService;
// A PromoResourceService fetches data from a web resource server to be used to
@@ -34,8 +25,8 @@
class PromoResourceService
: public WebResourceService {
public:
- static bool IsBuildTargeted(chrome::VersionInfo::Channel channel,
- int builds_targeted);
+ // Checks for conditions to show promo: start/end times, channel, etc.
+ static bool CanShowPromo(Profile* profile);
static void RegisterPrefs(PrefService* local_state);
@@ -47,6 +38,7 @@
static const char* kDefaultPromoResourceServer;
private:
+ FRIEND_TEST_ALL_PREFIXES(PromoResourceServiceTest, IsBuildTargeted);
FRIEND_TEST_ALL_PREFIXES(PromoResourceServiceTest, UnpackLogoSignal);
FRIEND_TEST_ALL_PREFIXES(PromoResourceServiceTest, UnpackPromoSignal);
FRIEND_TEST_ALL_PREFIXES(PromoResourceServiceTest, UnpackWebStoreSignal);
@@ -72,6 +64,9 @@
void Init();
+ static bool IsBuildTargeted(chrome::VersionInfo::Channel channel,
+ int builds_targeted);
+
// Returns true if |builds_targeted| includes the release channel Chrome
// belongs to. For testing purposes, you can override the current channel
// with set_channel.

Powered by Google App Engine
This is Rietveld 408576698