Switch OutputStream::Write to use string_view.

PiperOrigin-RevId: 854225267
This commit is contained in:
Francis Tsui
2026-01-09 09:37:00 -08:00
committed by Copybara-Service
parent 3d92559201
commit fbf66ad7e3
61 changed files with 227 additions and 198 deletions
@@ -20,6 +20,7 @@
#include <memory>
#include <utility>
#include "absl/strings/string_view.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "internal/flags/nearby_flags.h"
@@ -246,7 +247,8 @@ BluetoothSocket::BluetoothOutputStream::BluetoothOutputStream(
winrt_output_stream_ = stream;
}
Exception BluetoothSocket::BluetoothOutputStream::Write(const ByteArray& data) {
Exception BluetoothSocket::BluetoothOutputStream::Write(
absl::string_view data) {
try {
if (data.size() > write_buffer_.Capacity()) {
LOG(WARNING) << __func__