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

Unified Diff: components/proximity_auth/throttled_bluetooth_connection_finder.cc

Issue 2561203002: Migrate weave-related classes from proximity_auth/ble to cryptauth/ble. (Closed)
Patch Set: Rebase. 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/proximity_auth/throttled_bluetooth_connection_finder.cc
diff --git a/components/proximity_auth/throttled_bluetooth_connection_finder.cc b/components/proximity_auth/throttled_bluetooth_connection_finder.cc
index a02525936d3851018189734bb1b530c34dbc63db..d70669bac970e1a4ea003de1b44201bd858a0100 100644
--- a/components/proximity_auth/throttled_bluetooth_connection_finder.cc
+++ b/components/proximity_auth/throttled_bluetooth_connection_finder.cc
@@ -10,15 +10,16 @@
#include "base/location.h"
#include "base/task_runner.h"
#include "base/time/time.h"
+#include "components/cryptauth/bluetooth_throttler.h"
+#include "components/cryptauth/connection.h"
#include "components/proximity_auth/bluetooth_connection_finder.h"
-#include "components/proximity_auth/bluetooth_throttler.h"
namespace proximity_auth {
ThrottledBluetoothConnectionFinder::ThrottledBluetoothConnectionFinder(
std::unique_ptr<BluetoothConnectionFinder> connection_finder,
scoped_refptr<base::TaskRunner> task_runner,
- BluetoothThrottler* throttler)
+ cryptauth::BluetoothThrottler* throttler)
: connection_finder_(std::move(connection_finder)),
task_runner_(task_runner),
throttler_(throttler),
@@ -28,7 +29,8 @@ ThrottledBluetoothConnectionFinder::~ThrottledBluetoothConnectionFinder() {
}
void ThrottledBluetoothConnectionFinder::Find(
- const ConnectionCallback& connection_callback) {
+ const cryptauth::ConnectionFinder::ConnectionCallback&
+ connection_callback) {
const base::TimeDelta delay = throttler_->GetDelay();
// Wait, if needed.
@@ -47,8 +49,8 @@ void ThrottledBluetoothConnectionFinder::Find(
}
void ThrottledBluetoothConnectionFinder::OnConnection(
- const ConnectionCallback& connection_callback,
- std::unique_ptr<Connection> connection) {
+ const cryptauth::ConnectionFinder::ConnectionCallback& connection_callback,
+ std::unique_ptr<cryptauth::Connection> connection) {
throttler_->OnConnection(connection.get());
connection_callback.Run(std::move(connection));
}

Powered by Google App Engine
This is Rietveld 408576698