Index: components/sync_driver/BUILD.gn |
diff --git a/components/sync_driver/BUILD.gn b/components/sync_driver/BUILD.gn |
index ffe41b8b23f1dc137cda814fbe564932764f8486..38b89a8c3e2747c69eb7901f849d95ba69b565a6 100644 |
--- a/components/sync_driver/BUILD.gn |
+++ b/components/sync_driver/BUILD.gn |
@@ -2,6 +2,7 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import("//build/buildflag_header.gni") |
import("//build/config/features.gni") |
source_set("sync_driver") { |
@@ -120,6 +121,9 @@ source_set("sync_driver") { |
"user_selectable_sync_type.h", |
] |
+ public_deps = [ |
+ ":features", |
+ ] |
deps = [ |
"//base", |
"//base:prefs", |
@@ -250,3 +254,12 @@ source_set("unit_tests") { |
] |
} |
} |
+ |
+buildflag_header("features") { |
+ header = "sync_driver_features.h" |
+ |
+ # Whether to back up data before sync. |
+ enable_pre_sync_backup = is_win || is_mac || (is_linux && !is_chromeos) |
+ |
+ flags = [ "ENABLE_PRE_SYNC_BACKUP=$enable_pre_sync_backup" ] |
+} |