| Index: components/safe_browsing/web_ui/resources/safe_browsing.js
|
| diff --git a/components/safe_browsing/web_ui/resources/safe_browsing.js b/components/safe_browsing/web_ui/resources/safe_browsing.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d47e9a2c812e8cc280e13dd05a573f7fff6fd14e
|
| --- /dev/null
|
| +++ b/components/safe_browsing/web_ui/resources/safe_browsing.js
|
| @@ -0,0 +1,29 @@
|
| +/* Copyright 2017 The Chromium Authors. All rights reserved.
|
| +* Use of this source code is governed by a BSD-style license that can be
|
| +* found in the LICENSE file. */
|
| +
|
| + cr.define('safe_browsing', function() {
|
| + 'use strict';
|
| +
|
| + function initialize() {
|
| + chrome.send('expParamList',[]);
|
| + }
|
| +
|
| + function addExperiment(result) {
|
| + var resLength = result.length;
|
| + var experimentsListFormatted="";
|
| +
|
| +for (var i = 0; i < resLength; i+=2) {
|
| + experimentsListFormatted += "<div>" + result[i+1] + " --- " + result [i] +
|
| + "</div>";}
|
| + $('experimentsList').innerHTML = experimentsListFormatted;
|
| + }
|
| +
|
| + return {
|
| + addExperiment: addExperiment,
|
| + initialize: initialize,
|
| + };
|
| +
|
| +});
|
| +
|
| +document.addEventListener('DOMContentLoaded', safe_browsing.initialize);
|
|
|