Chromium Code Reviews

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

Issue 7820003: Add support to download web store promo logos over https. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
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 23504187e7b43da8373bb7e1ab643afe901f1d30..2cb6a794865c4f209165d32991dfea5f2e85fce2 100644
--- a/chrome/browser/web_resource/promo_resource_service.h
+++ b/chrome/browser/web_resource/promo_resource_service.h
@@ -11,6 +11,8 @@
#include "chrome/browser/web_resource/web_resource_service.h"
#include "chrome/common/chrome_version_info.h"
+class AppsPromoLogoDownloader;
+class PrefService;
class Profile;
namespace PromoResourceServiceUtil {
@@ -21,8 +23,6 @@ bool CanShowPromo(Profile* profile);
} // namespace PromoResourceServiceUtil
-class PrefService;
-
// 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
// been used to fetch "tips" to be displayed on the NTP, or to display
@@ -52,6 +52,13 @@ class PromoResourceService
FRIEND_TEST_ALL_PREFIXES(PromoResourceServiceTest, UnpackWebStoreSignal);
FRIEND_TEST_ALL_PREFIXES(
PromoResourceServiceTest, UnpackPartialWebStoreSignal);
+ FRIEND_TEST_ALL_PREFIXES(
+ PromoResourceServiceTest, UnpackWebStoreSignalHttpsLogo);
+ FRIEND_TEST_ALL_PREFIXES(
+ PromoResourceServiceTest, UnpackWebStoreSignalHttpsLogoError);
+ FRIEND_TEST_ALL_PREFIXES(
+ PromoResourceServiceTest, UnpackWebStoreSignalHttpLogo);
+
// Identifies types of Chrome builds for promo targeting.
enum BuildType {
@@ -202,6 +209,9 @@ class PromoResourceService
// Overrides the current Chrome release channel for testing purposes.
chrome::VersionInfo::Channel channel_;
+ // A helper that downloads the promo logo.
+ scoped_ptr<AppsPromoLogoDownloader> apps_promo_logo_downloader_;
+
DISALLOW_COPY_AND_ASSIGN(PromoResourceService);
};

Powered by Google App Engine