Put the on-device permission prediction service behind tflite flag

TfLite is not supported on all build types. So the on-device permission prediction feature has to be put behind the BUILD_WITH_TFLITE_LIB flag

Bug: 1272446
Change-Id: Iabf72c8c6bfd3a861b2e7edb7a09d91a784a43cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3365241
Reviewed-by: Balazs Engedy <[email protected]>
Reviewed-by: Ramin Halavati <[email protected]>
Commit-Queue: Ravjit Uppal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#955116}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 0c4c7cebb..bd251c1 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -1127,8 +1127,6 @@
     "permissions/permission_manager_factory.h",
     "permissions/prediction_based_permission_ui_selector.cc",
     "permissions/prediction_based_permission_ui_selector.h",
-    "permissions/prediction_model_handler_factory.cc",
-    "permissions/prediction_model_handler_factory.h",
     "permissions/prediction_service_factory.cc",
     "permissions/prediction_service_factory.h",
     "permissions/prediction_service_request.cc",
@@ -7256,6 +7254,13 @@
       "component_updater/file_type_policies_component_installer.h",
     ]
   }
+
+  if (build_with_tflite_lib) {
+    sources += [
+      "permissions/prediction_model_handler_factory.cc",
+      "permissions/prediction_model_handler_factory.h",
+    ]
+  }
 }
 
 if (is_android) {