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

Unified Diff: components/cryptauth/ble/bluetooth_low_energy_weave_packet_generator.cc

Issue 2844773002: [ProximityAuth] Remote static initializers from uWeave classes. (Closed)
Patch Set: Created 3 years, 8 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/cryptauth/ble/bluetooth_low_energy_weave_packet_generator.cc
diff --git a/components/cryptauth/ble/bluetooth_low_energy_weave_packet_generator.cc b/components/cryptauth/ble/bluetooth_low_energy_weave_packet_generator.cc
index 164a47b65de6ac34a65a6e117fdbb721ba02645a..cba14631aaf1099a448e6aea30cdeb9d82721c71 100644
--- a/components/cryptauth/ble/bluetooth_low_energy_weave_packet_generator.cc
+++ b/components/cryptauth/ble/bluetooth_low_energy_weave_packet_generator.cc
@@ -20,7 +20,7 @@ namespace cryptauth {
namespace weave {
// static.
-std::shared_ptr<BluetoothLowEnergyWeavePacketGenerator::Factory>
+BluetoothLowEnergyWeavePacketGenerator::Factory*
BluetoothLowEnergyWeavePacketGenerator::Factory::factory_instance_ =
nullptr;
@@ -28,14 +28,14 @@ std::shared_ptr<BluetoothLowEnergyWeavePacketGenerator::Factory>
std::unique_ptr<BluetoothLowEnergyWeavePacketGenerator>
BluetoothLowEnergyWeavePacketGenerator::Factory::NewInstance() {
if (!factory_instance_) {
- factory_instance_.reset(new Factory());
+ factory_instance_ = new Factory();
}
return factory_instance_->BuildInstance();
}
// static.
void BluetoothLowEnergyWeavePacketGenerator::Factory::SetInstanceForTesting(
- std::shared_ptr<Factory> factory) {
+ Factory* factory) {
factory_instance_ = factory;
}

Powered by Google App Engine
This is Rietveld 408576698