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

Unified Diff: content/browser/bluetooth/bluetooth_dispatcher_host.h

Issue 1377453007: bluetooth: Keep GATT connections open by retaining BluetoothGattConnection objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-thread-
Patch Set: clear in set_adapter Created 5 years, 2 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 | « no previous file | content/browser/bluetooth/bluetooth_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/bluetooth/bluetooth_dispatcher_host.h
diff --git a/content/browser/bluetooth/bluetooth_dispatcher_host.h b/content/browser/bluetooth/bluetooth_dispatcher_host.h
index 8a8714f17bf49c1a84d065a7ba5dfe001ec64d03..83e4a45bb6abf40c0fa8ebdafb682337d1e1b965 100644
--- a/content/browser/bluetooth/bluetooth_dispatcher_host.h
+++ b/content/browser/bluetooth/bluetooth_dispatcher_host.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/id_map.h"
+#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "content/public/browser/bluetooth_chooser.h"
#include "content/public/browser/browser_message_filter.h"
@@ -187,6 +188,10 @@ class CONTENT_EXPORT BluetoothDispatcherHost final
// sessions when other sessions are active.
base::Timer discovery_session_timer_;
+ // Retain BluetoothGattConnection objects to keep connections open.
+ // TODO(scheib): Destroy as connections are closed. http://crbug.com/539643
+ ScopedVector<device::BluetoothGattConnection> connections_;
+
// |weak_ptr_on_ui_thread_| provides weak pointers, e.g. for callbacks, and
// because it exists and has been bound to the UI thread enforces that all
// copies verify they are also used on the UI thread.
« no previous file with comments | « no previous file | content/browser/bluetooth/bluetooth_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698