Commit Graph
50 Commits
Author SHA1 Message Date
Edwin Wu 04022d0db3 Refactor MediumEnvironment to improve FakeClock usage.
PiperOrigin-RevId: 904891357
2026-04-24 02:07:38 -07:00
Francis Tsui f088ef3b74 Remove unnecessary DevicInfoImpl class.
PiperOrigin-RevId: 892102193
2026-03-30 22:18:31 -07:00
Francis Tsui 0cc01b476c Cleanup
PiperOrigin-RevId: 879854458
2026-03-06 15:45:29 -08:00
hai007 595e71a36d Automated Code Change
PiperOrigin-RevId: 877067723
2026-03-01 12:36:54 -08:00
Francis Tsui 931624a621 Prevent logging connection failure when mDNS client connects to test the connection.
PiperOrigin-RevId: 850545490
2025-12-30 16:54:14 -08:00
Francis Tsui 782464c674 Remove deprecated usage of MutexLock.
PiperOrigin-RevId: 829582162
2025-11-07 14:41:27 -08:00
Francis Tsui 520223f3b9 Add IS_VLOG_ON macro to platform logging.
PiperOrigin-RevId: 820402805
2025-10-16 14:47:30 -07:00
Francis Tsui 72088b7fe2 Remove Timer::FireNow.
PiperOrigin-RevId: 811123106
2025-09-24 18:44:41 -07:00
Francis Tsui 70bb114778 Set HTTP timeout.
PiperOrigin-RevId: 806439483
2025-09-12 15:04:40 -07:00
Francis Tsui 296b135f54 Cleanup AuthenticationManager and AccoutManager interface.
PiperOrigin-RevId: 803516888
2025-09-05 10:36:09 -07:00
hai007 71cdf84236 Replace NEARBY_LOGS with LOG for all coding under google3/third_party/nearby/
PiperOrigin-RevId: 786733783
2025-07-24 09:34:17 -07:00
hai007 7480977c58 Automated Code Change
PiperOrigin-RevId: 786349659
2025-07-23 11:07:56 -07:00
Francis Tsui 09cdc14fb6 Fix files.cc.
PiperOrigin-RevId: 764926334
2025-05-29 16:17:09 -07:00
Francis Tsui 151ba03d0f Create nearby::FilePath class to replace use of std::filesystem::path.
- Replace filesystem::path in DeviceInfo.

PiperOrigin-RevId: 761224912
2025-05-20 14:12:07 -07:00
Francis Tsui 979d6e5bc4 Fix timer cannot be restarted after firing.
PiperOrigin-RevId: 740450323
2025-03-25 12:45:42 -07:00
Francis Tsui c1e145eb04 Remove WaitForRunningTasksWithTimeout.
PiperOrigin-RevId: 694627070
2024-11-08 13:49:21 -08:00
Francis Tsui 0a0c915a79 Create new SigninAttempt object.
PiperOrigin-RevId: 694229619
2024-11-07 13:31:36 -08:00
Francis Tsui b4d11ecbda Use machine name for advertisement when user not logged in.
PiperOrigin-RevId: 690479544
2024-10-27 22:52:21 -07:00
Francis Tsui 5840369ce6 Remove unused deviceInfo methods.
PiperOrigin-RevId: 688334273
2024-10-21 17:46:16 -07:00
Anay Wadhera 7185c11452 Exclude fake webrtc sources from platform compile
PiperOrigin-RevId: 686642000
2024-10-16 14:26:04 -07:00
Francis Tsui d89e1f6832 Use client_secret and client_id from prefs in grpc client.
PiperOrigin-RevId: 671450009
2024-09-05 11:39:47 -07:00
Suet-Fei Li a81ce57879 Support 3P oauth flow.
PiperOrigin-RevId: 663964316
2024-08-16 19:39:13 -07:00
Francis Tsui a8757a2c49 internal changes.
PiperOrigin-RevId: 658928907
2024-08-02 15:47:15 -07:00
Francis Tsui b55ea69464 Add credential_error flag on Logout notification.
PiperOrigin-RevId: 658500314
2024-08-01 12:36:13 -07:00
Francis Tsui 1097288e54 Fix threading issues in NearbySharingServiceImpl.
PiperOrigin-RevId: 634527776
2024-05-16 14:22:48 -07:00
Francis Tsui 159ca34072 Add Shutdown method to TaskRunner.
PiperOrigin-RevId: 628448253
2024-04-26 10:44:21 -07:00
Francis Tsui 683b46488a Fix non hermetic test cases.
PiperOrigin-RevId: 627875242
2024-04-24 15:48:54 -07:00
Francis Tsui d69bd78d13 Fix deadlock during log rotations.
PiperOrigin-RevId: 622916139
2024-04-08 12:10:26 -07:00
hai007 cf2a1eb0b1 Internal change
PiperOrigin-RevId: 613133183
2024-03-06 10:21:45 -08:00
Copybara-Service ee404cb766 Merge pull request #2307 from ChenWangG:patch-1
PiperOrigin-RevId: 612604370
2024-03-04 15:42:43 -08:00
Francis Tsui d15f533721 Cleanup BUILD dependencies.
PiperOrigin-RevId: 609511614
2024-02-22 15:05:13 -08:00
Francis Tsui 97a3ceb311 - Remove unused data manager classes.
PiperOrigin-RevId: 596628112
2024-01-08 10:08:39 -08:00
Francis Tsui 94ae577069 - Cleanup BUILD deps
PiperOrigin-RevId: 592976313
2023-12-21 16:45:49 -08:00
Francis Tsui aea7a09a24 Switch DeviceInfo to use UTF-8 strings.
- Move conversion from native to UTF-8 into platform impl.

PiperOrigin-RevId: 592912664
2023-12-21 11:35:20 -08:00
Francis Tsui 32740f8591 Move FakeAccountManager to nearby/internal/test
PiperOrigin-RevId: 592055356
2023-12-18 17:30:16 -08:00
Janusz Sobczak 8846f8b57e Migrate to AnyInvocable in data/
PiperOrigin-RevId: 566721712
2023-09-19 13:13:30 -07:00
Janusz Sobczak b33c0e0332 Migrate to AnyInvocable in auth module
Merged success/failure callbacks into a single callback
in SignInCallback and AccessTokenCallback to simplify resource management and to avoid making copies.

PiperOrigin-RevId: 565744310
2023-09-15 12:11:50 -07:00
Guogang Li fabeff0d57 Added APIs to control device sleep
These APIs can be used to prevent device into sleep when sending supper big files.

PiperOrigin-RevId: 556809236
2023-08-14 09:05:11 -07:00
Guogang Li c6566b00c7 internal update
PiperOrigin-RevId: 549351164
2023-07-19 10:15:19 -07:00
Guogang Li a72be2bc8c internal update
PiperOrigin-RevId: 547982511
2023-07-13 18:21:18 -07:00
Guogang Li 85a01e9636 internal refactor
PiperOrigin-RevId: 547586065
2023-07-12 13:31:57 -07:00
Qin Wang a8b6fdee59 Implement fake GetResponse and migrate fake_http_client to third_party/nearby/internal/test
PiperOrigin-RevId: 544518775
2023-06-29 18:39:50 -07:00
Qin Wang 22c3a07677 Migrate DataManager to third_party/nearby/internal
PiperOrigin-RevId: 544395891
2023-06-29 10:31:07 -07:00
Juliet Levesque 240159e872 [Nearby Connections] Stop 3 AttemptsToConnect over WebRTC for CancellationFlag
CancellationFlags will be used to prevent crashes during the shutdown of Nearby Connections from pending tasks taking too long during the shutdown period. WebRTC using 3 x 10s retries to connect, which means we are potentially waiting for 30 seconds of retries to execute during shutdown (which is longer than the 10s duration alloted for Core shutdown).

By using CancellationFlags, we can prevent the retries occuring during the Shutdown by short-circuiting an in flight AttemptToConnect, and checking for Cancellation before retries.

PiperOrigin-RevId: 539690403
2023-06-12 10:16:36 -07:00
Juliet Levesque 8a78212bb8 [Nearby Connections] Check for shutdown before accessing ClientProxy.
During the destruction of NearbyConnections, Core (which owns ClientProxy) is destructed before ServiceController (which owns EndpointManager), which means any pending tasks on the EndpointManager executor that use ClientProxy will be using
garbage memory. To fix this issue, EndpointManager::DiscardEndpoint will check
for an `is_shutdown` boolean set during ~EndpointManager before accessing
ClientProxy. The assumption is that any accessing of ClientProxy after the
destruction will be invalid.

PiperOrigin-RevId: 532581122
2023-05-16 14:54:20 -07:00
Nick Bourdakos ebab912fb6 Fix heap-use-after-free issue in fake timer
PiperOrigin-RevId: 530644090
2023-05-09 10:15:09 -07:00
Guogang Li 15d81201f8 Fixed data race in FakeTaskRunner
PiperOrigin-RevId: 528627577
2023-05-01 18:06:35 -07:00
Guogang Li 46e4b3eca7 Fixed a data race bug in test codes
PiperOrigin-RevId: 528074883
2023-04-28 22:25:09 -07:00
Qin Wang 698ca77f2a Mutex guard FakeClock
PiperOrigin-RevId: 527382176
2023-04-26 14:52:46 -07:00
Qin Wang 86ca85b85a Migrate fake functions to third_party/nearby to help unit test
PiperOrigin-RevId: 517433481
2023-03-17 09:34:58 -07:00