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

Side by Side Diff: chrome/browser/resources/safe_browsing/safe_browsing_v3.js

Issue 480393002: Move the security interstitials into a single folder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comments Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Must match the commands handled by SafeBrowsingBlockingPage::CommandReceived.
6 var SB_CMD_DO_REPORT = 'doReport';
7 var SB_CMD_DONT_REPORT = 'dontReport';
8 var SB_CMD_EXPANDED_SEE_MORE = 'expandedSeeMore';
9 var SB_CMD_LEARN_MORE_2 = 'learnMore2';
10 var SB_CMD_PROCEED = 'proceed';
11 var SB_CMD_REPORT_ERROR = 'reportError';
12 var SB_CMD_SHOW_DIAGNOSTIC = 'showDiagnostic';
13 var SB_CMD_SHOW_PRIVACY = 'showPrivacy';
14 var SB_CMD_TAKE_ME_BACK = 'takeMeBack';
15
16 // Other constants defined in safe_browsing_blocking_page.cc.
17 var SB_BOX_CHECKED = 'boxchecked';
18 var SB_DISPLAY_CHECK_BOX = 'displaycheckbox';
19
20 // This sets up the Extended Safe Browsing Reporting opt-in.
21 function setupCheckbox() {
22 if (loadTimeData.getBoolean('ssl') || loadTimeData.getBoolean('phishing') ||
23 !loadTimeData.getBoolean(SB_DISPLAY_CHECK_BOX)) {
24 return;
25 }
26
27 $('opt-in-label').innerHTML = loadTimeData.getString('optInLink');
28 $('opt-in-checkbox').checked = loadTimeData.getBoolean(SB_BOX_CHECKED);
29 $('malware-opt-in').classList.remove('hidden');
30
31 $('opt-in-checkbox').addEventListener('click', function() {
32 sendCommand(
33 $('opt-in-checkbox').checked ? SB_CMD_DO_REPORT : SB_CMD_DONT_REPORT);
34 });
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698