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

Unified Diff: chrome/browser/resources/safe_browsing/malware_block_v2.js

Issue 14752005: Finch experiments on SSL, malware, and phishing interstitials (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Made changes per Adam L's review Created 7 years, 8 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/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..3fbb10f843b21583eb1c0521c0896ea7c8192067 100644
--- a/chrome/browser/resources/safe_browsing/malware_block_v2.js
+++ b/chrome/browser/resources/safe_browsing/malware_block_v2.js
@@ -38,6 +38,45 @@ function seeMore() {
}
}
+function setupFinch() {
+ var condition = $('trial-type').innerHTML;
mattm 2013/05/01 20:17:17 Don't need to stick this in a hidden div to get it
felt 2013/05/01 22:46:44 Done.
+ if (condition == '') {
+ return; // This is the most common case.
+ } else if (condition == 'Cond2MalwareNoBrand' ||
+ condition == 'Cond4PhishingNoBrand') {
+ $('logo').style.display = 'none';
+ } else if (condition == 'Cond5MalwareOneStep' ||
+ condition == 'Cond6PhishingOneStep') {
+ $('see-more-contents').hidden = false;
+ $('see-less-text').hidden = true;
+ $('see-more-text').hidden = true;
+ } else if (condition == 'Cond7MalwareFearMsg') {
+ $('headline').innerText = 'Your computer might get malware if you ' +
+ 'proceed. Go back!';
mattm 2013/05/01 20:17:17 strings need to go in chrome/app/generated_resourc
felt 2013/05/01 20:36:29 Is that worth doing even though this is just an ex
mattm 2013/05/01 20:49:12 Ah, missed that part. I think the style is still t
James Hawkins 2013/05/01 20:49:55 Yes, strings in grit.
felt 2013/05/01 22:46:44 Done.
+ } else if (condition == 'Cond8PhishingFearMsg') {
+ $('headline').innerText = 'You might be the victim of a phishing attack ' +
+ 'if you proceed. Go back!';
+ } else if (condition == 'Cond9MalwareCollabMsg') {
+ $('headline').innerText = 'Help Google stop the spread of malware. ' +
+ 'Go back!';
+ } else if (condition == 'Cond10PhishingCollabMsg') {
+ $('headline').innerText = 'Help Google stop phishing attacks. ' +
+ 'Go back!';
+ } else if (condition == 'Cond11MalwareQuestion') {
+ $('headline').innerText = 'Do you want to infect your computer with a ' +
+ 'virus? If not, go back!';
+ } else if (condition == 'Cond12PhishingQuestion') {
+ $('headline').innerText = 'Do you want to be the victim of a phishing ' +
+ 'attack? If not, go back!';
+ } else if (condition == 'Cond13MalwareGoBack') {
+ $('headline').innerText = 'The Website Ahead Contains Malware! ' +
+ 'Go Back!';
+ } else if (condition == 'Cond14PhishingGoBack') {
+ $('headline').innerText = 'Reported Phishing Website Ahead! ' +
+ 'Go Back!';
+ }
+}
+
/**
* Onload listener to initialize javascript handlers.
*/
@@ -71,6 +110,8 @@ document.addEventListener('DOMContentLoaded', function() {
// handler, we don't want the default actions.
preventDefaultOnPoundLinkClicks(); // From webui/js/util.js.
+ setupFinch();
+
// Allow jsdisplay elements to be visible now.
document.documentElement.classList.remove('loading');
});

Powered by Google App Engine
This is Rietveld 408576698