Commit Graph
58 Commits
Author SHA1 Message Date
Francis Tsui 675b28c717 Internal changes
PiperOrigin-RevId: 872474540
2026-02-19 10:58:34 -08:00
Francis Tsui a60821574f Fix absl::WebSafeBase64Escape deprecation.
PiperOrigin-RevId: 871947460
2026-02-18 10:55:34 -08:00
Francis Tsui 9ccfded727 Cleanup unnecessary files and classes.
PiperOrigin-RevId: 823206305
2025-10-23 15:15:43 -07:00
Francis Tsui d4c86c83c1 Start scheduled task to call GetAccountInfo.
PiperOrigin-RevId: 809234366
2025-09-19 16:33:27 -07:00
Francis Tsui 358557342c Do not start CertificateManager scheduled tasks if user not logged in.
PiperOrigin-RevId: 808831574
2025-09-18 19:17:07 -07:00
Francis Tsui 525e0e7b11 Remove assumption that RPC calls are synchronous.
PiperOrigin-RevId: 807256161
2025-09-15 08:47:24 -07:00
Francis Tsui 6589b3dcb5 Change rpc client to prepare for switching to async client.
PiperOrigin-RevId: 805018155
2025-09-09 12:28:51 -07:00
Francis Tsui 1b99ec036b Simplify callback interface on CertificateDownloadContext.
PiperOrigin-RevId: 804519883
2025-09-08 11:36:56 -07:00
Ivo Ristovski List 038c73520d Automated Code Change
PiperOrigin-RevId: 802282871
2025-09-02 14:04:04 -07:00
Francis Tsui 6113d225e9 Move unnecessary INFO logs to VLOG.
PiperOrigin-RevId: 797451961
2025-08-20 13:58:51 -07:00
Francis Tsui 29f37997ec Make BT MacAddress optional in Private certs.
PiperOrigin-RevId: 797357330
2025-08-20 09:59:47 -07:00
Francis Tsui c0a2194ab1 Move PublishDevice rpc from LocalDeviceDataManager to CertificateManager.
PiperOrigin-RevId: 796916479
2025-08-19 09:59:22 -07:00
Francis Tsui cff660eacf Remove unnecessary optional from scheduler.
PiperOrigin-RevId: 795275868
2025-08-14 18:07:15 -07:00
Francis Tsui 651d6c4f00 Cleanup usage of optional in Certificate management.
PiperOrigin-RevId: 794755803
2025-08-13 15:17:46 -07:00
Francis Tsui 9d42718e68 Remove unused code.
PiperOrigin-RevId: 785603603
2025-07-21 15:49:05 -07:00
Francis Tsui 01013cb824 Remove unused code.
PiperOrigin-RevId: 785558158
2025-07-21 13:40:05 -07:00
Francis Tsui 308c98044b Remove CallNearbyIdentityApi flag.
PiperOrigin-RevId: 781101105
2025-07-09 10:04:49 -07:00
Francis Tsui 2d8b71703e Cleanup certificate manager path management.
PiperOrigin-RevId: 768146823
2025-06-06 11:15:29 -07:00
Francis Tsui 7ce7527f60 Add logging of uploaded and downloaded cert ids.
PiperOrigin-RevId: 744807951
2025-04-07 12:16:40 -07:00
Francis Tsui b8ad929123 More frequent contact sync.
PiperOrigin-RevId: 744801485
2025-04-07 11:59:13 -07:00
Francis Tsui 8f52d4129a Stop generating selected contacts certs.
PiperOrigin-RevId: 742919089
2025-04-01 18:48:39 -07:00
Francis Tsui 0222177e94 Move device ID generation to login success.
PiperOrigin-RevId: 742428028
2025-03-31 15:44:59 -07:00
Francis Tsui b8815f5229 Remove legacy log macros.
PiperOrigin-RevId: 735161065
2025-03-09 13:13:10 -07:00
Francis Tsui 5038280159 Remove legacy log macros.
PiperOrigin-RevId: 734977247
2025-03-08 16:36:16 -08:00
Francis Tsui 270c23cb7f Prevent crash if CallNearbyIdentityApi flag updated during process lifetime.
PiperOrigin-RevId: 733485303
2025-03-04 15:24:21 -08:00
Francis Tsui 2587c6abad Do not reschedule private cert expiration check if user is logged out.
PiperOrigin-RevId: 726168581
2025-02-12 13:10:47 -08:00
Francis Tsui e3a2460844 Add unittest.
PiperOrigin-RevId: 715587586
2025-01-14 17:26:08 -08:00
Francis Tsui 6694e2bf19 Ignore cert refresh when not logged in.
PiperOrigin-RevId: 715556067
2025-01-14 15:39:40 -08:00
Francis Tsui 1adcca9bc6 Disable certificate manager from receiving notification from contact manager when call_nearby_identity_api flag is enabled.
PiperOrigin-RevId: 713430869
2025-01-08 15:09:36 -08:00
Francis Tsui c9fbf6b690 internal changes
PiperOrigin-RevId: 709164576
2024-12-23 15:28:50 -08:00
Suet-Fei Li 6ac8179d96 [Identity API Migration] Call PrivateCertificateRefresh when the receiving flow starts.
PiperOrigin-RevId: 703156988
2024-12-05 10:12:43 -08:00
Francis Tsui 79f1a2e492 Add ability to load single PublicCertificate by ID.
PiperOrigin-RevId: 700754672
2024-11-27 11:10:27 -08:00
Francis Tsui fc878df6e0 Remove unused methods.
PiperOrigin-RevId: 700483531
2024-11-26 15:56:01 -08:00
Francis Tsui b46cbc62b4 Do not upload to backend if not logged in.
PiperOrigin-RevId: 700057202
2024-11-25 12:00:53 -08:00
Suet-Fei Li 0803db861f migrate QueryShareCredentials.
PiperOrigin-RevId: 699329477
2024-11-22 17:09:43 -08:00
Suet-Fei Li 526288eaae Migration to new Identity API PublishDevice.
PiperOrigin-RevId: 699308985
2024-11-22 15:45:06 -08:00
Francis Tsui f5e526317b Force certificate generation and upload on first time uploading contacts.
PiperOrigin-RevId: 698901640
2024-11-21 13:49:31 -08:00
Anay Wadhera 63c8486a41 Plumb vendor ID in certificate metadata and only set it in advertisement when advertising in everyone mode.
PiperOrigin-RevId: 694636952
2024-11-08 14:15:27 -08: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
Suet-Fei Li 6443dfedf7 remove FullName & IconUrl from preference & local device data manager.
PiperOrigin-RevId: 692612482
2024-11-02 22:50:40 -07:00
Suet-Fei Li cf8d435f81 Remove NearbyShareLocalDeviceDataManagerImpl::DownloadDeviceData.
PiperOrigin-RevId: 692265844
2024-11-01 12:57:21 -07:00
Suet-Fei Li a81ce57879 Support 3P oauth flow.
PiperOrigin-RevId: 663964316
2024-08-16 19:39:13 -07:00
Francis Tsui 8ba3c9bdf9 cleanup
PiperOrigin-RevId: 658887170
2024-08-02 13:23:11 -07:00
Francis Tsui d81ced95c7 Log backend rpc errors.
PiperOrigin-RevId: 648859480
2024-07-02 15:22:02 -07:00
Anay Wadhera a91f428e71 Remove selected contacts code from service
PiperOrigin-RevId: 639122146
2024-05-31 12:47:24 -07:00
Francis Tsui 16f820471e Remove use of dynamic_cast from nearby/sharing.
PiperOrigin-RevId: 634519160
2024-05-16 13:57:01 -07:00
Anay Wadhera f26d25ed01 Provide a platform abstraction for RandBytes instead of swapping headers
The `RandBytes` functions were being placed in the `crypto` namespace,
which collides with Chromium's namespace of the same name. Within,
`RandBytes` was defined with almost-the-same API. Then in Chromium
builds, the Chromium header would be used instead (though somewhat
inconsistently).

This creates a lot of pain for Chromium development as there's a
third-party repository directly depending on headers from Chromium's
source tree, and is against the third-party policies for that reason.
There are a number of other headers that mirror Chromium and are
swapped out in the Chromium build that will cause similar pain, such as:
```
include "crypto/aead.h"
include "crypto/ec_private_key.h"
include "crypto/hkdf.h"
```

This CL provides a template for how to get rid of these header swaps and
give a platform abstraction in nearby instead.

We provide a platform abstraction in `platform/crypto.h` (really in
`platform/implementation/crypto.h`) which is implemented in
`platform/implementation/shared/crypto.cc`. However that implementation
is removed by `#ifdef` when in the Chromium build.

Then, in the Chromium repo, we will add (separately) an implementation
of the same abstraction in `//third_party/nearby/platform_impl` with GN
rules to include it in the build. It will replace the implementation
from the nearby repo.

Copybara import of the project:

--
6ca8099 by danakj <danakj@chromium.org>:

Provide a platform abstraction for RandBytes instead of swapping headers

The `RandBytes` functions were being placed in the `crypto` namespace,
which collides with Chromium's namespace of the same name. Within,
`RandBytes` was defined with almost-the-same API. Then in Chromium
builds, the Chromium header would be used instead (though somewhat
inconsistently).

This creates a lot of pain for Chromium development as there's a
third-party repository directly depending on headers from Chromium's
source tree, and is against the third-party policies for that reason.
There are a number of other headers that mirror Chromium and are
swapped out in the Chromium build that will cause similar pain, such as:
```
include "crypto/aead.h"
include "crypto/ec_private_key.h"
include "crypto/hkdf.h"
```

This CL provides a template for how to get rid of these header swaps and
give a platform abstraction in nearby instead.

We provide a platform abstraction in `platform/crypto.h` (really in
`platform/implementation/crypto.h`) which is implemented in
`platform/implementation/shared/crypto.cc`. However that implementation
is removed by `#ifdef` when in the Chromium build.

Then, in the Chromium repo, we will add (separately) an implementation
of the same abstraction in `//third_party/nearby/platform_impl` with GN
rules to include it in the build. It will replace the implementation
from the nearby repo.

--
9c2654b by danakj <danakj@chromium.org>:

Remove CryptoSpan, use absl::Span

The header swapping of Chromium crypto libraries is
problematic, but absl::Span will convert to base::span
so there's no need for the typedef even without
removing the header swapping yet.

--
df1135d by danakj <danakj@chromium.org>:

Add missing files

--
ab18a15 by danakj <danakj@chromium.org>:

Remove the random_unittest.cc from Swift build

The file moved, so the Swift package needs its path
updated.

--
2038f78 by danakj <danakj@chromium.org>:

Combine crypto unittests into crypto_test.cc

--
f7ad176 by danakj <danakj@chromium.org>:

Add stdint and stddef includes for uint8_t and size_t

--
9f04590 by danakj <danakj@chromium.org>:

Mark the shared crypto implementation compatable_with non_prod

--
18eeafd by danakj <danakj@chromium.org>:

Add IWYU pragma for crypto implementation

PiperOrigin-RevId: 632150866
2024-05-09 08:02:50 -07:00
Francis Tsui 683b46488a Fix non hermetic test cases.
PiperOrigin-RevId: 627875242
2024-04-24 15:48:54 -07:00
Nick Bourdakos a08a42077c PR #2404: Add license header to all source files
Imported from GitHub PR https://github.com/google/nearby/pull/2404

Copybara import of the project:

--
a6fbb3c396321c0b9012b787323f5f2ff652fd8f by Nick Bourdakos <bourdakos1@gmail.com>:

Add license header to all source files

Merging this change closes #2404

PiperOrigin-RevId: 623540004
2024-04-10 10:40:38 -07:00