Commit Graph
10 Commits
Author SHA1 Message Date
Francis Tsui ae015665cd Set file last modified time.
PiperOrigin-RevId: 791926107
2025-08-06 18:25:42 -07:00
Janusz Sobczak 2c55c0cdbd Refactor Pipe implementation
* Remove Pipe classes
* Rename BasePipe to Pipe
* Hide Pipe class in anonymous namespace in pipe.cc
* Add CreatePipe static method
* Replace Payload(std::function<InputStream&()>) with Payload(std::unique_ptr<InputStream>)
* Find&Replace Pipe usages

PiperOrigin-RevId: 557276980
2023-08-15 15:53:58 -07:00
hai007 9a22f71a54 Remove PayLoad::AsBytes()&& to fix -Wreturn-stack-address error
With never versions of libc++, Chromium builds would fail with:

  ../../third_party/nearby/src/connections/payload.cc:105:50:
  error: returning reference to local temporary object [-Werror,-Wreturn-stack-address]
      return result ? std::move(*result) : std::move(ByteArray());
                                                     ^~~~~~~~~~~

Before this libc++ version, the error was masked by the std::move.

If I understand correctly, the only user of this function was
BytesInternalPayload::DetachNextChunk() which was going to make a copy of the
ByteArray annyways, so it might as well use the AsBytes() overload that returns
a const ref.

See also https://crbug.com/1407615#c2

PiperOrigin-RevId: 502946204
2023-01-18 12:21:22 -08:00
Suet-Fei Li 084f7ebd88 Remove location namespace in third_party/nearby.
PiperOrigin-RevId: 500023196
2023-01-06 02:53:57 -08:00
jfcarroll 6fc5b64605 Flattening payload and listeners
PiperOrigin-RevId: 443168939
2022-04-20 12:55:23 -07:00
jfcarroll 4c13db0c2d This is a fix for incoming payloads not having a file_name set.
PiperOrigin-RevId: 440438936
2022-04-08 13:25:42 -07:00
jfcarroll f4b80ccb59 These are the changes for Payload::Type => PayloadType for the flattening CL
PiperOrigin-RevId: 436767666
2022-03-23 10:11:15 -07:00
jfcarroll 6d24d42132 Fix a bug where output files aren't being downloaded.
PiperOrigin-RevId: 435672340
2022-03-18 10:24:20 -07:00
jfcarroll 517d77f5aa This adds parent path and file name to the Payload constructor. This will affect chrome.
PiperOrigin-RevId: 435223740
2022-03-16 19:18:13 -07:00
hais f5fcd35ced nearby sdk refactor
PiperOrigin-RevId: 425434260
2022-02-02 11:56:39 -08:00