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

Side by Side Diff: content/browser/bluetooth/bluetooth_device_chooser_controller.h

Issue 2577183002: Add UMA for the number of devices in the chooser when a device is paired (Closed)
Patch Set: address comments 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 unified diff | Download patch
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 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_ 5 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_
6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_ 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <unordered_set>
9 10
10 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
11 #include "base/optional.h" 12 #include "base/optional.h"
12 #include "base/time/time.h" 13 #include "base/time/time.h"
13 #include "base/timer/timer.h" 14 #include "base/timer/timer.h"
14 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
15 #include "content/public/browser/bluetooth_chooser.h" 16 #include "content/public/browser/bluetooth_chooser.h"
16 #include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.moj om.h" 17 #include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.moj om.h"
17 18
18 namespace device { 19 namespace device {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 143
143 // The last discovery session to be started. 144 // The last discovery session to be started.
144 // TODO(ortuno): This should be null unless there is an active discovery 145 // TODO(ortuno): This should be null unless there is an active discovery
145 // session. We need to null it when the platform stops discovery. 146 // session. We need to null it when the platform stops discovery.
146 // http://crbug.com/611852 147 // http://crbug.com/611852
147 std::unique_ptr<device::BluetoothDiscoverySession> discovery_session_; 148 std::unique_ptr<device::BluetoothDiscoverySession> discovery_session_;
148 149
149 // The time when scanning starts. 150 // The time when scanning starts.
150 base::Optional<base::TimeTicks> scanning_start_time_; 151 base::Optional<base::TimeTicks> scanning_start_time_;
151 152
153 // The device ids that are currently shown in the chooser.
154 std::unordered_set<std::string> device_ids_;
155
152 // Weak pointer factory for generating 'this' pointers that might live longer 156 // Weak pointer factory for generating 'this' pointers that might live longer
153 // than we do. 157 // than we do.
154 // Note: This should remain the last member so it'll be destroyed and 158 // Note: This should remain the last member so it'll be destroyed and
155 // invalidate its weak pointers before any other members are destroyed. 159 // invalidate its weak pointers before any other members are destroyed.
156 base::WeakPtrFactory<BluetoothDeviceChooserController> weak_ptr_factory_; 160 base::WeakPtrFactory<BluetoothDeviceChooserController> weak_ptr_factory_;
157 }; 161 };
158 162
159 } // namespace content 163 } // namespace content
160 164
161 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_ 165 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698