Commit 4bd980e7 authored by Kyle Horimoto's avatar Kyle Horimoto Committed by Commit Bot

[CrOS MultiDevice] Add an ID to FakeErrorTolerantBleAdvertisement.

Bug: 824568, 752273
Change-Id: I7a58651e9a137ae0c35c7a8085d931ad3cf28647
Reviewed-on: https://chromium-review.googlesource.com/1092161Reviewed-by: default avatarRyan Hansberry <hansberry@chromium.org>
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565517}
parent f1922e62
......@@ -14,6 +14,7 @@ FakeErrorTolerantBleAdvertisement::FakeErrorTolerantBleAdvertisement(
const DeviceIdPair& device_id_pair,
base::OnceCallback<void(const DeviceIdPair&)> destructor_callback)
: ErrorTolerantBleAdvertisement(device_id_pair),
id_(base::UnguessableToken::Create()),
destructor_callback_(std::move(destructor_callback)) {}
FakeErrorTolerantBleAdvertisement::~FakeErrorTolerantBleAdvertisement() {
......
......@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/unguessable_token.h"
#include "chromeos/services/secure_channel/device_id_pair.h"
#include "chromeos/services/secure_channel/error_tolerant_ble_advertisement.h"
......@@ -22,6 +23,8 @@ class FakeErrorTolerantBleAdvertisement : public ErrorTolerantBleAdvertisement {
base::OnceCallback<void(const DeviceIdPair&)> destructor_callback);
~FakeErrorTolerantBleAdvertisement() override;
const base::UnguessableToken& id() const { return id_; }
void InvokeStopCallback();
// ErrorTolerantBleAdvertisement:
......@@ -29,6 +32,7 @@ class FakeErrorTolerantBleAdvertisement : public ErrorTolerantBleAdvertisement {
bool HasBeenStopped() override;
private:
base::UnguessableToken id_;
base::OnceCallback<void(const DeviceIdPair&)> destructor_callback_;
base::Closure stop_callback_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment