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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_service_win.cc

Issue 1763983002: Change scoped_ptr to a type alias for std::unique_ptr on OS_WIN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bluetooth Created 4 years, 9 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
« no previous file with comments | « base/memory/scoped_ptr_unittest.cc ('k') | printing/backend/printing_info_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_remote_gatt_service_win.cc
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_win.cc b/device/bluetooth/bluetooth_remote_gatt_service_win.cc
index 19064eb67da44106d74581c238c8aed0acd5f950..84127ed51a795d9ece41a595ef34c6156973fabf 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_win.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_service_win.cc
@@ -250,6 +250,10 @@ void BluetoothRemoteGattServiceWin::RemoveIncludedCharacteristic(
void BluetoothRemoteGattServiceWin::ClearIncludedCharacteristics() {
discovery_completed_included_charateristics_.clear();
+ // Explicitly reset to null to ensure that calling GetCharacteristic() on the
+ // removed characteristic in GattDescriptorRemoved() returns null.
+ for (auto& entry : included_characteristics_)
+ entry.second.reset();
included_characteristics_.clear();
}
« no previous file with comments | « base/memory/scoped_ptr_unittest.cc ('k') | printing/backend/printing_info_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698