Add kill switch mechanism
This code implements the kill switch mechanism in the extension. This is
explained in //src/killSwitch/README.md and in the design doc:
https://docs.google.com/document/d/1O5YV6_WcxwrUyz-lwHOSTfZ3oyIFWj2EQee0VuKkhaA/edit.
Bug: twpowertools:64
Change-Id: Ia993c78035bba7038aafd53d156f20954217e86f
diff --git a/src/killSwitch/README.md b/src/killSwitch/README.md
new file mode 100644
index 0000000..40eb335
--- /dev/null
+++ b/src/killSwitch/README.md
@@ -0,0 +1,23 @@
+# Kill Switch
+The "Kill Switch" is a system which allows the extension maintainer and some
+authorized people to remotely disable a specific feature which is misbehaving
+to everyone.
+
+This folder contains the code that the extension uses to interact with the Kill
+Swtich server to determine whether a feature should be disabled or not.
+
+## Explanation
+The kill switch mechanism works as follows:
+
+1. There's a dashboard available at https://twpt-dashboard.avm99963.com/. There,
+some authorized users can set some features to be disabled for everyone,
+according to some criteria (it might be specified that only some versions of the
+extension or some browsers are affected by this).
+1. When a feature is set from the dashboard as force disabled (what we call
+"enable a kill switch"), an entry is added to the server's database.
+1. Every 30 minutes, the extension queries the server behind the dashboard, to
+retrieve a list of force disabled features from the database.
+1. The extension processes this list, and if any of the features in the list
+apply to the extension according to the linked criteria, it force disables
+those. If, on the contrary, a feature which was force disabled is no longer
+force disabled, the previous status is restored.