mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 07:06:11 -04:00
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