Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Unified Diff: components/cryptauth/ble/bluetooth_low_energy_weave_client_connection.cc

Issue 2561203002: Migrate weave-related classes from proximity_auth/ble to cryptauth/ble. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/cryptauth/ble/bluetooth_low_energy_weave_client_connection.cc
diff --git a/components/proximity_auth/ble/bluetooth_low_energy_weave_client_connection.cc b/components/cryptauth/ble/bluetooth_low_energy_weave_client_connection.cc
similarity index 98%
rename from components/proximity_auth/ble/bluetooth_low_energy_weave_client_connection.cc
rename to components/cryptauth/ble/bluetooth_low_energy_weave_client_connection.cc
index 6f96df20bb0c530913476d1437a1bc580c25274c..e6247c18dfb18f5565a8462f4c3ca5fd3c978f79 100644
--- a/components/proximity_auth/ble/bluetooth_low_energy_weave_client_connection.cc
+++ b/components/cryptauth/ble/bluetooth_low_energy_weave_client_connection.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/proximity_auth/ble/bluetooth_low_energy_weave_client_connection.h"
+#include "components/cryptauth/ble/bluetooth_low_energy_weave_client_connection.h"
#include <utility>
@@ -24,7 +24,7 @@ using device::BluetoothRemoteGattCharacteristic;
using device::BluetoothGattNotifySession;
using device::BluetoothUUID;
-namespace proximity_auth {
+namespace cryptauth {
namespace weave {
namespace {
@@ -43,7 +43,7 @@ BluetoothLowEnergyWeaveClientConnection::
const cryptauth::RemoteDevice& device,
scoped_refptr<device::BluetoothAdapter> adapter,
const BluetoothUUID remote_service_uuid,
- BluetoothThrottler* bluetooth_throttler,
+ proximity_auth::BluetoothThrottler* bluetooth_throttler,
int max_number_of_write_attempts)
: Connection(device),
adapter_(adapter),
@@ -178,14 +178,15 @@ void BluetoothLowEnergyWeaveClientConnection::SetTaskRunnerForTesting(
}
void BluetoothLowEnergyWeaveClientConnection::SendMessageImpl(
- std::unique_ptr<WireMessage> message) {
+ std::unique_ptr<proximity_auth::WireMessage> message) {
PA_LOG(INFO) << "Sending message " << message->Serialize();
std::string serialized_msg = message->Serialize();
std::vector<Packet> packets =
packet_generator_->EncodeDataMessage(serialized_msg);
- std::shared_ptr<WireMessage> request_message(message.release());
+ std::shared_ptr<proximity_auth::WireMessage> request_message(
+ message.release());
for (uint32_t i = 0; i < packets.size(); ++i) {
WriteRequestType request_type = (i == packets.size() - 1)
@@ -615,7 +616,7 @@ std::string BluetoothLowEnergyWeaveClientConnection::GetReasonForClose() {
BluetoothLowEnergyWeaveClientConnection::WriteRequest::WriteRequest(
const Packet& val,
WriteRequestType request_type,
- std::shared_ptr<WireMessage> message)
+ std::shared_ptr<proximity_auth::WireMessage> message)
: value(val),
request_type(request_type),
message(message),
@@ -636,4 +637,4 @@ BluetoothLowEnergyWeaveClientConnection::WriteRequest::~WriteRequest() {}
} // namespace weave
-} // namespace proximity_auth
+} // namespace cryptauth

Powered by Google App Engine
This is Rietveld 408576698