Commit Graph
83 Commits
Author SHA1 Message Date
kidfromjupiter cd24003e6e Initial linux commit 2025-09-25 16:37:45 +05:30
Francis Tsui 70bb114778 Set HTTP timeout.
PiperOrigin-RevId: 806439483
2025-09-12 15:04:40 -07:00
Francis Tsui 1d6f44e6b5 Internal changes.
PiperOrigin-RevId: 804560917
2025-09-08 13:23:27 -07:00
Francis Tsui 296b135f54 Cleanup AuthenticationManager and AccoutManager interface.
PiperOrigin-RevId: 803516888
2025-09-05 10:36:09 -07:00
Francis Tsui ab94af291f Create compatibility for moving platform API to use MacAddress class.
PiperOrigin-RevId: 800533547
2025-08-28 10:58:22 -07:00
hai007 7480977c58 Automated Code Change
PiperOrigin-RevId: 786349659
2025-07-23 11:07:56 -07:00
Francis Tsui bd4ac34c38 Rotate log file by file size.
PiperOrigin-RevId: 768267049
2025-06-06 16:41:43 -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
Guogang Li 1ed2423717 Expose AWDL platform APIs to support PSK based TLS
PiperOrigin-RevId: 759165452
2025-05-15 08:47:50 -07:00
Francis Tsui 866b3fa9e1 Make api::ble_v2::BlePeripheral into a concrete class.
PiperOrigin-RevId: 753745108
2025-05-01 15:11:08 -07:00
hai007 8acf924934 Add AWDL as a new Medium type in Nearby platform
PiperOrigin-RevId: 741515012
2025-03-28 07:14:40 -07:00
hai007 00e6b231f6 Automated Code Change
PiperOrigin-RevId: 726320513
2025-02-12 21:58:34 -08:00
Janusz Sobczak 949c035446 Clean up build rules
PiperOrigin-RevId: 712669082
2025-01-06 15:02:15 -08:00
Janusz Sobczak f9292be707 Remove unused fastpair C++ implementation to streamline the codebase
PiperOrigin-RevId: 712639309
2025-01-06 13:26:55 -08:00
Anay Wadhera b00d9ab8ce internal change
PiperOrigin-RevId: 697827597
2024-11-18 18:27:58 -08:00
Francis Tsui 6128c537d8 cleanup oauth HTTP server.
PiperOrigin-RevId: 696559039
2024-11-14 09:58:03 -08:00
Francis Tsui 0a0c915a79 Create new SigninAttempt object.
PiperOrigin-RevId: 694229619
2024-11-07 13:31:36 -08:00
hai007 00d0a7d3f0 Automated Code Change
PiperOrigin-RevId: 688449841
2024-10-22 01:43:44 -07:00
Guogang Li 6707efeed8 internal refactor
PiperOrigin-RevId: 676552917
2024-09-19 13:58:21 -07:00
Anay Wadhera 01e9a6e0e2 internal fix
PiperOrigin-RevId: 652927652
2024-07-16 11:57:29 -07:00
hai007 556a026a6e Automated Code Change
PiperOrigin-RevId: 633055418
2024-05-12 18:49:35 -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 8d41593056 Internal changes.
PiperOrigin-RevId: 623002360
2024-04-08 17:56:34 -07:00
hai007 cf2a1eb0b1 Internal change
PiperOrigin-RevId: 613133183
2024-03-06 10:21:45 -08:00
Juliet Levesque 6b2f7fa94e [Nearby Presence] Fetch and select correct local credentials
Fetch the local credentials and select the correct local credential by verifying the validity of the time. This CL will be followed by
using the selected local credential for authentication. See go/cros-nearby-presence-np-nc-authentication  for details.

PiperOrigin-RevId: 603772266
2024-02-02 17:23:41 -08:00
Francis Tsui 1072030be8 Copy sharing/internal, sharing/common and sharing/scheduling to github.
- Move Abseil pin to same as that used in Chromium.
- Disabled layering_check due to build failure in absl.

PiperOrigin-RevId: 596631921
2024-01-08 10:20:37 -08:00
hai007 16cb7f70b3 Implement Auto-reconnect after disconnection [1]
PiperOrigin-RevId: 592344338
2023-12-19 14:27:40 -08:00
Francis Tsui 85091845a8 Turn AccountManager into pure abstract interface.
PiperOrigin-RevId: 591143389
2023-12-14 21:55:29 -08:00
Nick Bourdakos aa0c06257f Add macOS as an OS type
PiperOrigin-RevId: 561959449
2023-09-01 08:19:11 -07:00
Nick Bourdakos c1d74120a0 Add initial BLEv2 Bluetooth Adapter
PiperOrigin-RevId: 551922301
2023-07-28 12:32:27 -07:00
Crisrael Lucero 0e44ed626d Refactor crypto/ directory into crypto_cros/ and crypto/
PiperOrigin-RevId: 549467911
2023-07-19 17:12:52 -07:00
Guogang Li 4a71c4d2d0 Move NS implementation to third party folder
PiperOrigin-RevId: 546966492
2023-07-10 13:39:42 -07:00
Janusz Sobczak ca60afa007 Add robust gatt client
PiperOrigin-RevId: 539817203
2023-06-12 18:29:59 -07:00
Nick Bourdakos 8886b99dde Refactor the preferences repository to be a Windows implementation detail of the preferences manager
PiperOrigin-RevId: 531086202
2023-05-10 21:26:32 -07:00
Janusz Sobczak 0901aec6e2 Add BleMedium::GetRemotePeripheral
Added:
nearby::api::ble_v2::BlePeripheral::GetUniqueId()
nearby::api::ble_v2::BleMedium::GetRemotePeripheral(...)

Moved BlePeripheral implementation from bluetooth_adapter_* to ble_v2.*
Added G3 (test) implementation for the new methods.

PiperOrigin-RevId: 531023568
2023-05-10 15:40:38 -07:00
hai007 4eaaeb254d Clean up third_party/nearby/connections/implementation/analytics
PiperOrigin-RevId: 529811175
2023-05-05 14:13:49 -07:00
Nick Bourdakos 58772e95f9 Internal change
PiperOrigin-RevId: 529464527
2023-05-04 11:24:39 -07:00
hai007 102679b630 Automated visibility attribute cleanup.
PiperOrigin-RevId: 527138508
2023-04-25 20:25:44 -07:00
Chun Zhang 2e7f7a7d90 Migrate PreferencesManager from location/nearby to third_party/nearby
PiperOrigin-RevId: 524900136
2023-04-17 11:23:01 -07:00
Suet-Fei Li 31f3f53000 Fix crypto include path for Chromium.
PiperOrigin-RevId: 524452486
2023-04-14 20:56:29 -07:00
hai007 6dac39292b Remove unneeded fastpair dependency.
PiperOrigin-RevId: 524369312
2023-04-14 13:18:02 -07:00
Chun Zhang 00bba36219 Migrate PreferencesRepository from location/nearby to third_party/nearby
PiperOrigin-RevId: 524185819
2023-04-13 21:19:12 -07:00
hai007 c8ea42dbc6 internal change
PiperOrigin-RevId: 522650183
2023-04-07 11:55:05 -07:00
Hai Shang c312442f3d internal clean up
PiperOrigin-RevId: 521555239
2023-04-03 14:00:22 -07:00
Hai Shang 47b7a04939 minor clean up
PiperOrigin-RevId: 520734787
2023-03-30 13:56:57 -07:00
Nick Bourdakos 14e7832be0 Internal change
PiperOrigin-RevId: 520638739
2023-03-30 12:34:53 -07:00
Nick Bourdakos a933a91413 Internal Change
PiperOrigin-RevId: 520165614
2023-03-28 16:26:40 -07:00
Nick Bourdakos cbf50a3d49 Add more visibilities
PiperOrigin-RevId: 518647351
2023-03-22 12:51:23 -07:00
Nick Bourdakos 0b3c759aa3 Remove unneeded WebRTC flags
PiperOrigin-RevId: 518629654
2023-03-22 11:44:12 -07:00
Nick Bourdakos ec025502dc Refactor WebRTC code to avoid use of select for stubs
PiperOrigin-RevId: 518491132
2023-03-22 00:25:54 -07:00