Support building Perfetto as part of Chrome

Change-Id: I4ea39895852e8fa02df7e0ad45f6b4b103ec3195
diff --git a/protozero/src/protoc_plugin/BUILD.gn b/protozero/src/protoc_plugin/BUILD.gn
index 7ab92fb..0f8cc4d 100644
--- a/protozero/src/protoc_plugin/BUILD.gn
+++ b/protozero/src/protoc_plugin/BUILD.gn
@@ -12,6 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import("//build_overrides/build.gni")
+
 if (current_toolchain == host_toolchain) {
   executable("protoc_plugin") {
     sources = [
@@ -19,7 +21,18 @@
       "protozero_generator.h",
       "protozero_plugin.cc",
     ]
-    deps += [ "//buildtools:protoc_lib" ]
+
+    if (!build_with_chromium) {
+      deps = [
+        "../../../gn:default_deps",
+        "//buildtools:protoc_lib",
+      ]
+    } else {
+      deps = [
+        "//third_party/protobuf:protoc_lib",
+      ]
+    }
+
     if (is_clang) {
       # Internal protobuf headers hit this.
       cflags = [ "-Wno-unreachable-code" ]