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

Side by Side Diff: chromeos/components/tether/ble_connection_manager_unittest.cc

Issue 2844773002: [ProximityAuth] Remote static initializers from uWeave classes. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/cryptauth/ble/bluetooth_low_energy_weave_client_connection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chromeos/components/tether/ble_connection_manager.h" 5 #include "chromeos/components/tether/ble_connection_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/timer/mock_timer.h" 8 #include "base/timer/mock_timer.h"
9 #include "chromeos/components/tether/ble_constants.h" 9 #include "chromeos/components/tether/ble_constants.h"
10 #include "chromeos/components/tether/proto/tether.pb.h" 10 #include "chromeos/components/tether/proto/tether.pb.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 .WillByDefault(Return(true)); 265 .WillByDefault(Return(true));
266 266
267 device_queue_ = new BleAdvertisementDeviceQueue(); 267 device_queue_ = new BleAdvertisementDeviceQueue();
268 mock_timer_factory_ = new MockTimerFactory(); 268 mock_timer_factory_ = new MockTimerFactory();
269 mock_bluetooth_throttler_ = base::WrapUnique(new MockBluetoothThrottler()); 269 mock_bluetooth_throttler_ = base::WrapUnique(new MockBluetoothThrottler());
270 270
271 fake_connection_factory_ = base::WrapUnique(new FakeConnectionFactory( 271 fake_connection_factory_ = base::WrapUnique(new FakeConnectionFactory(
272 mock_adapter_, device::BluetoothUUID(std::string(kGattServerUuid)), 272 mock_adapter_, device::BluetoothUUID(std::string(kGattServerUuid)),
273 mock_bluetooth_throttler_.get())); 273 mock_bluetooth_throttler_.get()));
274 cryptauth::weave::BluetoothLowEnergyWeaveClientConnection::Factory:: 274 cryptauth::weave::BluetoothLowEnergyWeaveClientConnection::Factory::
275 SetInstanceForTesting(std::move(fake_connection_factory_)); 275 SetInstanceForTesting(fake_connection_factory_.get());
276 276
277 fake_secure_channel_factory_ = 277 fake_secure_channel_factory_ =
278 base::WrapUnique(new FakeSecureChannelFactory()); 278 base::WrapUnique(new FakeSecureChannelFactory());
279 cryptauth::SecureChannel::Factory::SetInstanceForTesting( 279 cryptauth::SecureChannel::Factory::SetInstanceForTesting(
280 fake_secure_channel_factory_.get()); 280 fake_secure_channel_factory_.get());
281 281
282 manager_ = base::WrapUnique(new BleConnectionManager( 282 manager_ = base::WrapUnique(new BleConnectionManager(
283 fake_cryptauth_service_.get(), mock_adapter_, 283 fake_cryptauth_service_.get(), mock_adapter_,
284 base::WrapUnique(mock_ble_scanner_), 284 base::WrapUnique(mock_ble_scanner_),
285 base::WrapUnique(mock_ble_advertiser_), base::WrapUnique(device_queue_), 285 base::WrapUnique(mock_ble_advertiser_), base::WrapUnique(device_queue_),
(...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 cryptauth::SecureChannel::Status::DISCONNECTED}, 1211 cryptauth::SecureChannel::Status::DISCONNECTED},
1212 {test_devices_[1], cryptauth::SecureChannel::Status::CONNECTING, 1212 {test_devices_[1], cryptauth::SecureChannel::Status::CONNECTING,
1213 cryptauth::SecureChannel::Status::DISCONNECTED}, 1213 cryptauth::SecureChannel::Status::DISCONNECTED},
1214 {test_devices_[2], cryptauth::SecureChannel::Status::CONNECTING, 1214 {test_devices_[2], cryptauth::SecureChannel::Status::CONNECTING,
1215 cryptauth::SecureChannel::Status::DISCONNECTED}}); 1215 cryptauth::SecureChannel::Status::DISCONNECTED}});
1216 } 1216 }
1217 1217
1218 } // namespace tether 1218 } // namespace tether
1219 1219
1220 } // namespace cryptauth 1220 } // namespace cryptauth
OLDNEW
« no previous file with comments | « no previous file | components/cryptauth/ble/bluetooth_low_energy_weave_client_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698