Files
nearby/cpp
nohle f483110a8d [NearbyConnections][C++] Have Cores share single ServiceControllerRouter
We refactor the `Core`/`ServiceControllerRouter`/`ServiceController` classes to better align with the GmsCore implementation. Notably,

1. `Core` instances share the same `ServiceControllerRouter`.
2. `ServiceControllerRouter` directly owns one `OfflineServiceController`--that is created lazily and destroyed when when the router is destroyed--instead of using a factory method to create `ServiceController`s.
3. Removes obsolete "strategy" logic from `ServiceControllerRouter`, which used to recreate service controllers if the "strategy" changed.
4. Removes `ServiceControllerRouter::ClientDisconnecting()`, which is identical to `StopAllEndpoints()`.
5. Makes various C++ style clean-ups like removing unnecessary static variables/functions.

See analogous Chrome OS changes at http://crrev.com/c/3025604.

PiperOrigin-RevId: 389188124
2021-08-06 09:07:31 -07:00
..