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

Unified Diff: components/proximity_auth/ble/proximity_auth_ble_system.cc

Issue 1251843002: Using WireMessage instead of FakeWireMessage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing notification issue Created 5 years, 4 months 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/proximity_auth/ble/proximity_auth_ble_system.cc
diff --git a/components/proximity_auth/ble/proximity_auth_ble_system.cc b/components/proximity_auth/ble/proximity_auth_ble_system.cc
index 7d124681730585f6364608097d96446de14499dd..9b559128341a0be42e05182390c7bec75afe03fa 100644
--- a/components/proximity_auth/ble/proximity_auth_ble_system.cc
+++ b/components/proximity_auth/ble/proximity_auth_ble_system.cc
@@ -24,6 +24,7 @@
#include "components/proximity_auth/logging/logging.h"
#include "components/proximity_auth/proximity_auth_client.h"
#include "components/proximity_auth/remote_device.h"
+#include "components/proximity_auth/wire_message.h"
#include "device/bluetooth/bluetooth_device.h"
#include "device/bluetooth/bluetooth_gatt_connection.h"
@@ -242,8 +243,8 @@ void ProximityAuthBleSystem::OnFocusedUserChanged(const std::string& user_id) {
void ProximityAuthBleSystem::OnMessageReceived(const Connection& connection,
const WireMessage& message) {
- // TODO(sacomoto): change this when WireMessage is fully implemented.
- PA_LOG(INFO) << "Message received: " << message.payload();
+ PA_LOG(INFO) << "Message with " << message.payload().size()
+ << " bytes received.";
// The first message should contain a public key registered in |unlock_keys_|
// to authenticate the device.
@@ -343,7 +344,7 @@ void ProximityAuthBleSystem::StartPollingScreenState() {
}
// Sends message requesting screen state.
connection_->SendMessage(
- make_scoped_ptr(new FakeWireMessage(kPollScreenState)));
+ make_scoped_ptr(new WireMessage(kPollScreenState)));
// Schedules the next message in |kPollingIntervalSeconds| s.
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
« no previous file with comments | « components/proximity_auth/ble/bluetooth_low_energy_connection_finder.cc ('k') | components/proximity_auth/connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698