[BackgroundSync] Add background_sync component.
Introduces a new component for BackgroundSync so code can be shared with
WebLayer. Migrates BackgroundSyncPermissionContext and its unittest.
Bug: 1087486
Change-Id: Ib2968305dfa674eec81985f4ae19780ca5d6d9e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421491
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Josh Karlin <[email protected]>
Commit-Queue: Mugdha Lakhani <[email protected]>
Cr-Commit-Position: refs/heads/master@{#809874}
diff --git a/components/background_sync/BUILD.gn b/components/background_sync/BUILD.gn
new file mode 100644
index 0000000..30728a5
--- /dev/null
+++ b/components/background_sync/BUILD.gn
@@ -0,0 +1,34 @@
+# Copyright 2020 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.
+
+static_library("background_sync") {
+ sources = [
+ "background_sync_permission_context.cc",
+ "background_sync_permission_context.h",
+ ]
+
+ deps = [
+ "//components/content_settings/core/browser",
+ "//components/content_settings/core/common",
+ "//components/permissions",
+ "//third_party/blink/public/common:headers",
+ ]
+}
+
+source_set("unit_tests") {
+ testonly = true
+ sources = [ "background_sync_permission_context_unittest.cc" ]
+
+ deps = [
+ ":background_sync",
+ "//base",
+ "//components/content_settings/core/browser",
+ "//components/permissions",
+ "//components/permissions:test_support",
+ "//content/public/browser",
+ "//content/test:test_support",
+ "//testing/gtest",
+ "//url:url",
+ ]
+}