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

Side by Side Diff: components/proximity_auth/bluetooth_throttler.h

Issue 663693002: [Easy Unlock] Port the BluetoothThrottler class to native code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_THROTTLER_H
6 #define COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_THROTTLER_H
7
8 namespace base {
9 class TimeDelta;
10 }
11
12 namespace proximity_auth {
13
14 // An interface for throttling repeated connection attempts to the same device.
15 // This throttling is necessary to prevent a kernel race condition when
16 // connecting before the previous connection fully closes, putting the
17 // connection in a corrupted, and unrecoverable state. http://crbug.com/345232
18 class BluetoothThrottler {
19 public:
20 virtual ~BluetoothThrottler() {}
21
22 // Returns the current delay that must be respected prior to reattempting to
23 // establish a connection with the remote device. The returned value is 0 if
24 // no delay is needed.
25 virtual base::TimeDelta GetDelay() const = 0;
26
27 // Should be called when a connection to the remote device is closed.
28 virtual void OnConnectionClosed() = 0;
29 };
30
31 } // namespace proximity_auth
32
33 #endif // COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_THROTTLER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698