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/Makefile b/Makefile
index 0123e00..3fdb95e 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,15 @@
 WEBPACK := ./node_modules/webpack-cli/bin/cli.js
 RELEASE_SCRIPT := bash tools/release.bash
 
+# The sed command and the third_party/google-protobuf-commonjs_strict folder are
+# needed because of https://github.com/protocolbuffers/protobuf/issues/7778.
+grpc_proto_gen:
+	(cd src/killSwitch && \
+		protoc -I=. --js_out=import_style=commonjs_strict:. api_proto/*.proto && \
+		protoc -I. --grpc-web_out=import_style=commonjs,mode=grpcwebtext:. api_proto/*.proto && \
+		(cd api_proto && \
+			sed -i -E "s/require\('google-protobuf\//require('..\/..\/third_party\/google-protobuf-commonjs_strict\//" *_pb.js ))
+
 node_deps:
 	npm ci --no-save