diff --git a/sharing/nearby_sharing_service_impl.h b/sharing/nearby_sharing_service_impl.h index 79bc9155..e943eba0 100644 --- a/sharing/nearby_sharing_service_impl.h +++ b/sharing/nearby_sharing_service_impl.h @@ -18,7 +18,7 @@ #include #include -#include // NOLINT(build/c++17) +#include #include #include #include @@ -588,19 +588,19 @@ class NearbySharingServiceImpl // advertising. PowerLevel advertising_power_level_ = PowerLevel::kUnknown; // True if we are currently scanning for remote devices. - bool is_scanning_ = false; + std::atomic_bool is_scanning_{false}; // True if we're currently sending or receiving a file. - bool is_transferring_ = false; + std::atomic_bool is_transferring_{false}; // True if we're currently receiving a file. - bool is_receiving_files_ = false; + std::atomic_bool is_receiving_files_{false}; // True if we're currently sending a file. - bool is_sending_files_ = false; + std::atomic_bool is_sending_files_{false}; // True if we're currently attempting to connect to a remote device. - bool is_connecting_ = false; + std::atomic_bool is_connecting_{false}; // The time scanning began. absl::Time scanning_start_timestamp_; // True when we are advertising with a device name visible to everyone. - bool in_high_visibility_ = false; + std::atomic_bool in_high_visibility_{false}; // The time attachments are sent after a share target is selected. This is // used to time the process from selecting a share target to writing the // introduction frame (last frame before receiver gets notified).