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

Unified Diff: chrome/browser/banners/app_banner_manager.cc

Issue 2434623002: Remove AppBannerManager code to skip secure context checks for tests. (Closed)
Patch Set: Clean up Created 4 years, 2 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
« no previous file with comments | « chrome/browser/banners/app_banner_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/banners/app_banner_manager.cc
diff --git a/chrome/browser/banners/app_banner_manager.cc b/chrome/browser/banners/app_banner_manager.cc
index a46c9dd012bfe2d0e632f0e29f8051c6811b7250..8feb7a6e8e678392a0807435c1af7c4730a42ce7 100644
--- a/chrome/browser/banners/app_banner_manager.cc
+++ b/chrome/browser/banners/app_banner_manager.cc
@@ -30,7 +30,6 @@
namespace {
-bool gDisableSecureCheckForTesting = false;
int gCurrentRequestID = -1;
base::LazyInstance<base::TimeDelta> gTimeDeltaForTesting =
LAZY_INSTANCE_INITIALIZER;
@@ -63,11 +62,6 @@ InstallableParams ParamsToPerformInstallableCheck(int ideal_icon_size_in_dp,
namespace banners {
// static
-void AppBannerManager::DisableSecureSchemeCheckForTesting() {
- gDisableSecureCheckForTesting = true;
-}
-
-// static
base::Time AppBannerManager::GetCurrentTime() {
return base::Time::Now() + gTimeDeltaForTesting.Get();
}
@@ -119,8 +113,7 @@ void AppBannerManager::RequestAppBanner(const GURL& validated_url,
// A secure origin is required to show banners, so exit early if we see the
// URL is invalid.
- if (!content::IsOriginSecure(validated_url) &&
- !gDisableSecureCheckForTesting) {
+ if (!content::IsOriginSecure(validated_url)) {
ReportStatus(contents, NOT_FROM_SECURE_ORIGIN);
Stop();
return;
« no previous file with comments | « chrome/browser/banners/app_banner_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698