Index: extensions/browser/api/storage/backend_task_runner.h |
diff --git a/extensions/browser/api/storage/backend_task_runner.h b/extensions/browser/api/storage/backend_task_runner.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d19f095e431c833dff65d3d9766812e8a6e46886 |
--- /dev/null |
+++ b/extensions/browser/api/storage/backend_task_runner.h |
@@ -0,0 +1,22 @@ |
+// 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. |
+ |
+#ifndef EXTENSIONS_BROWSER_API_STORAGE_BACKEND_TASK_RUNNER_H_ |
+#define EXTENSIONS_BROWSER_API_STORAGE_BACKEND_TASK_RUNNER_H_ |
+ |
+#include "base/memory/ref_counted.h" |
+#include "base/sequenced_task_runner.h" |
+ |
+namespace extensions { |
+ |
+// Gets the singleton task runner for running storage backend on. |
+scoped_refptr<base::SequencedTaskRunner> GetBackendTaskRunner(); |
+ |
+// Verifies the the backend task runner above runs tasks in the current |
+// sequence. |
+bool IsOnBackendSequence(); |
+ |
+} // namespace extensions |
+ |
+#endif // EXTENSIONS_BROWSER_API_STORAGE_BACKEND_TASK_RUNNER_H_ |