diff --git a/sharing/local_device_data/BUILD b/sharing/local_device_data/BUILD index c3780926..8336d0cf 100644 --- a/sharing/local_device_data/BUILD +++ b/sharing/local_device_data/BUILD @@ -42,7 +42,6 @@ cc_library( "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", "@com_google_absl//absl/time", - "@com_google_protobuf//:protobuf", ], ) diff --git a/sharing/local_device_data/nearby_share_local_device_data_manager_impl.cc b/sharing/local_device_data/nearby_share_local_device_data_manager_impl.cc index c99b950a..01dc86a0 100644 --- a/sharing/local_device_data/nearby_share_local_device_data_manager_impl.cc +++ b/sharing/local_device_data/nearby_share_local_device_data_manager_impl.cc @@ -24,7 +24,6 @@ #include #include -#include "google/protobuf/field_mask.pb.h" #include "absl/memory/memory.h" #include "absl/random/random.h" #include "absl/status/statusor.h" @@ -44,6 +43,7 @@ #include "sharing/internal/public/logging.h" #include "sharing/local_device_data/nearby_share_local_device_data_manager.h" #include "sharing/proto/device_rpc.pb.h" +#include "sharing/proto/field_mask.pb.h" #include "sharing/proto/rpc_resources.pb.h" #include "sharing/scheduling/nearby_share_scheduler.h" #include "sharing/scheduling/nearby_share_scheduler_factory.h" diff --git a/sharing/proto/BUILD b/sharing/proto/BUILD index 89a4d2a9..30f5465d 100644 --- a/sharing/proto/BUILD +++ b/sharing/proto/BUILD @@ -24,14 +24,12 @@ proto_library( "contact_rpc.proto", "device_rpc.proto", "encrypted_metadata.proto", + "field_mask.proto", "rpc_resources.proto", "settings_observer_data.proto", "timestamp.proto", ], visibility = ["//visibility:public"], - deps = [ - "@com_google_protobuf//:field_mask_proto", - ], ) cc_proto_library( diff --git a/sharing/proto/device_rpc.proto b/sharing/proto/device_rpc.proto index 6bc7e046..c92198a4 100644 --- a/sharing/proto/device_rpc.proto +++ b/sharing/proto/device_rpc.proto @@ -16,7 +16,7 @@ syntax = "proto3"; package nearby.sharing.proto; -import "google/protobuf/field_mask.proto"; +import "sharing/proto/field_mask.proto"; import "sharing/proto/rpc_resources.proto"; option optimize_for = LITE_RUNTIME; @@ -30,7 +30,7 @@ message UpdateDeviceRequest { // The FieldMask for updating specific columns in device table. For the // 'FieldMask' definition, see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; + FieldMask update_mask = 2; } // The response for UpdateDeviceRequest. diff --git a/sharing/proto/field_mask.proto b/sharing/proto/field_mask.proto new file mode 100644 index 00000000..375ebd77 --- /dev/null +++ b/sharing/proto/field_mask.proto @@ -0,0 +1,24 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package nearby.sharing.proto; + +option optimize_for = LITE_RUNTIME; + +message FieldMask { + // The set of field mask paths. + repeated string paths = 1; +}