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

Unified Diff: components/safe_browsing/web_ui/resources/safe_browsing.js

Issue 2964693003: Added experiments section and exported the list of SafeBrowsing features in WebUI (Closed)
Patch Set: Changed the location of features.cc/.h Created 3 years, 5 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: 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="";
+
vakh (use Gerrit instead) 2017/07/07 00:23:40 indentation. Run: git cl format
+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);

Powered by Google App Engine
This is Rietveld 408576698