Index: chrome/browser/resources/safe_browsing/malware_block_v2.js |
diff --git a/chrome/browser/resources/safe_browsing/malware_block_v2.js b/chrome/browser/resources/safe_browsing/malware_block_v2.js |
index 61550d9a1dbd4cfe99589b20aa6846396dad7e33..9c71504cc9269679c4643919d4dd9b7ce9456636 100644 |
--- a/chrome/browser/resources/safe_browsing/malware_block_v2.js |
+++ b/chrome/browser/resources/safe_browsing/malware_block_v2.js |
@@ -38,6 +38,21 @@ function seeMore() { |
} |
} |
+function setupInterstitialExperiment() { |
James Hawkins
2013/05/03 18:31:55
nit: Document method.
felt
2013/05/03 18:43:25
Done.
|
+ var condition = templateData.trialType; |
+ if (condition == '' || condition == 'Default') { |
+ return; // This is the most common case. |
+ } else if (condition == 'cond2MalwareNoBrand' || |
+ condition == 'cond4PhishingNoBrand') { |
+ $('logo').style.display = 'none'; |
James Hawkins
2013/05/03 18:31:55
Why display none instead of hidden?
felt
2013/05/03 18:43:25
Hidden would leave extra empty whitespace, right?
|
+ } else if (condition == 'cond5MalwareOneStep' || |
+ condition == 'cond6PhishingOneStep') { |
+ $('see-more-contents').hidden = false; |
+ $('see-less-text').hidden = true; |
+ $('see-more-text').hidden = true; |
+ } |
+} |
+ |
/** |
* Onload listener to initialize javascript handlers. |
*/ |
@@ -71,6 +86,8 @@ document.addEventListener('DOMContentLoaded', function() { |
// handler, we don't want the default actions. |
preventDefaultOnPoundLinkClicks(); // From webui/js/util.js. |
+ setupInterstitialExperiment(); |
+ |
// Allow jsdisplay elements to be visible now. |
document.documentElement.classList.remove('loading'); |
}); |