Project import generated by Copybara.

GitOrigin-RevId: d9e9e3fb4e31372ec1fb43b178994ca78fa8fe70
diff --git a/static_src/prpc-client-instance.js b/static_src/prpc-client-instance.js
new file mode 100644
index 0000000..103b9c6
--- /dev/null
+++ b/static_src/prpc-client-instance.js
@@ -0,0 +1,16 @@
+// Copyright 2019 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.
+
+/**
+ * @fileoverview Creates a globally shared instance of AutoRefreshPrpcClient
+ * to be used across the frontend, to share state and allow easy test stubbing.
+ */
+
+import AutoRefreshPrpcClient from 'prpc.js';
+
+// TODO(crbug.com/monorail/5049): Remove usage of window.CS_env here.
+export const prpcClient = new AutoRefreshPrpcClient(
+  window.CS_env ? window.CS_env.token : '',
+  window.CS_env ? window.CS_env.tokenExpiresSec : 0,
+);