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

Unified Diff: components/proximity_auth/remote_device_life_cycle_impl_unittest.cc

Issue 2561203002: Migrate weave-related classes from proximity_auth/ble to cryptauth/ble. (Closed)
Patch Set: Moved all general classes from proximity_auth to cryptauth. 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/remote_device_life_cycle_impl_unittest.cc
diff --git a/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc b/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc
index 913c9efcf0fa5cdda97bd1e3336bd9b523968d1e..2303875b8e1cc82143642f9db370223dfe49f84d 100644
--- a/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc
+++ b/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc
@@ -13,13 +13,13 @@
#include "base/macros.h"
#include "base/test/test_simple_task_runner.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "components/cryptauth/fake_connection.h"
+#include "components/cryptauth/wire_message.h"
#include "components/proximity_auth/authenticator.h"
#include "components/proximity_auth/connection_finder.h"
-#include "components/proximity_auth/fake_connection.h"
#include "components/proximity_auth/messenger.h"
#include "components/proximity_auth/proximity_auth_test_util.h"
#include "components/proximity_auth/secure_context.h"
-#include "components/proximity_auth/wire_message.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -68,12 +68,12 @@ class FakeConnectionFinder : public ConnectionFinder {
void OnConnectionFound() {
ASSERT_FALSE(connection_callback_.is_null());
std::unique_ptr<FakeConnection> scoped_connection_(
- new FakeConnection(remote_device_));
+ new cryptauth::FakeConnection(remote_device_));
connection_ = scoped_connection_.get();
connection_callback_.Run(std::move(scoped_connection_));
}
- FakeConnection* connection() { return connection_; }
+ cryptauth::FakeConnection* connection() { return connection_; }
private:
// ConnectionFinder:
@@ -84,7 +84,7 @@ class FakeConnectionFinder : public ConnectionFinder {
const cryptauth::RemoteDevice remote_device_;
- FakeConnection* connection_;
+ cryptauth::FakeConnection* connection_;
ConnectionCallback connection_callback_;
@@ -93,7 +93,8 @@ class FakeConnectionFinder : public ConnectionFinder {
class FakeAuthenticator : public Authenticator {
public:
- FakeAuthenticator(Connection* connection) : connection_(connection) {}
+ FakeAuthenticator(cryptauth::Connection* connection)
+ : connection_(connection) {}
~FakeAuthenticator() override {
// This object should be destroyed immediately after authentication is
// complete in order not to outlive the underlying connection.
@@ -117,7 +118,7 @@ class FakeAuthenticator : public Authenticator {
callback_ = callback;
}
- Connection* connection_;
+ cryptauth::Connection* connection_;
AuthenticationCallback callback_;
@@ -190,7 +191,7 @@ class ProximityAuthRemoteDeviceLifeCycleImplTest
life_cycle_.GetState());
}
- FakeConnection* OnConnectionFound() {
+ cryptauth::FakeConnection* OnConnectionFound() {
EXPECT_EQ(RemoteDeviceLifeCycle::State::FINDING_CONNECTION,
life_cycle_.GetState());

Powered by Google App Engine
This is Rietveld 408576698