Define inputs for device_policy_remover_generate target

device_policy_remover_generate did not specify inputs which caused
device_policy_remover.cc to be stale after chrome_device_policy.proto
updates in some cases.
Note: I'm not sure yet why this is necessary, as I'd have expected that by having
//components/policy/proto in public_deps, any change in public_deps' sources would
transitively trigger a rebuild of device_policy_remover_generate - without having
to explicitly list outputs of the dependent target as sources.

Bug: 933359
Test: (with target_os="chromeos") \
      Step 0: gn clean out/dir && ninja -C out/dir chrome \
      Step 1: touch components/policy/proto/chrome_device_policy.proto \
      Step 2: ninja -C out/dir chrome/browser/chromeos \
      Step 3: ls -la out/dir/gen/chrome/browser/chromeos/device_policy_remover.cc \
                     ^-- this file should be newer than chrome_device_policy.proto

Change-Id: I676eb3556b71b352aab1f03a0316c3d7c9a455ed
Reviewed-on: https://chromium-review.googlesource.com/c/1477706
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Pavol Marko <pmarko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#633318}
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn
index 6288dfa..a43860c 100644
--- a/chrome/browser/chromeos/BUILD.gn
+++ b/chrome/browser/chromeos/BUILD.gn
@@ -2674,8 +2674,18 @@
   script = "policy/tools/generate_device_policy_remover.py"
   descriptor_pool_path = "//third_party/protobuf/python"
   symbol_database_path = "$root_build_dir/pyproto"
-  chrome_device_policy_pb2_path =
+
+  # This is provided by //components/policy/proto listed in public_deps.
+  # The containing directory is in a separate variable because that's what
+  # the script expects as an argument.
+  chrome_device_policy_pb2_dir =
       "$root_build_dir/pyproto/components/policy/proto"
+  chrome_device_policy_pb2_path =
+      "$chrome_device_policy_pb2_dir/chrome_device_policy_pb2.py"
+
+  sources = [
+    chrome_device_policy_pb2_path,
+  ]
 
   outputs = [
     device_policy_remover_path,
@@ -2688,7 +2698,7 @@
     # directories for PATH variable to compile generated file
     rebase_path(descriptor_pool_path, root_build_dir),
     rebase_path(symbol_database_path, root_build_dir),
-    rebase_path(chrome_device_policy_pb2_path, root_build_dir),
+    rebase_path(chrome_device_policy_pb2_dir, root_build_dir),
   ]
 
   public_deps = [