Commit Graph

10 Commits

Author SHA1 Message Date
Ali Mohammad Pur
3a9f00c59b Everywhere: Use OOM-safe ByteBuffer APIs where possible
If we can easily communicate failure, let's avoid asserting and report
failure instead.
2021-09-06 01:53:26 +02:00
Max Wipfli
3bdaed501e AK+Everywhere: Remove StringView::find_{first,last}_of(char) methods
This removes StringView::find_first_of(char) and find_last_of(char) and
replaces all its usages with find and find_last respectively. This is
because those two methods are functionally equivalent.
find_{first,last}_of should only be used if searching for multiple
different characters, which is never the case with the char argument.

This also adds the [[nodiscard]] to the remaining find_{first,last}_of
methods.
2021-07-02 21:54:21 +02:00
Max Wipfli
30cdebfa9e LibProtocol: Use URL class in RequestClient::start_request argument
This changes the RequestClient::start_request() method to take a URL
object instead of a URL string as argument. All callers of the method
already had a URL object anyway, and start_request() in turn parses the
URL string back into a URL object. This removes this unnecessary
conversion.
2021-06-06 16:00:11 +02:00
Linus Groh
f5c35fccca Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
DexesTTP
71d27abb97 Services: Rename ProtocolServer to RequestServer
The current ProtocolServer was really only used for requests, and with
the recent introduction of the WebSocket service, long-lasting
connections with another server are not part of it. To better reflect
this, this commit renames it to RequestServer.

This commit also changes the existing 'protocol' portal to 'request',
the existing 'protocol' user and group to 'request', and most mentions
of the 'download' aspect of the request to 'request' when relevant, to
make everything consistent across the system.

Note that LibProtocol still exists as-is, but the more generic Client
class and the more specific Download class have both been renamed to a
more accurate RequestClient and Request to match the new names.

This commit only change names, not behaviors.
2021-04-25 19:04:34 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
AnotherTest
904e1002b8 pro: Use a rolling average for the download rate calculation
This makes it jump around less, and give a decent-ish representation of
download speed.
2021-01-30 14:12:14 +01:00
Andreas Kling
1cb44ec5ee Everywhere: Remove more <AK/SharedBuffer.h> includes 2021-01-17 00:04:42 +01:00
Andreas Kling
c71807a3fc Everywhere: Convert a handful of String::format() => formatted() 2021-01-16 14:52:04 +01:00
Andreas Kling
ececac65c2 Userland: Move command-line utilities to Userland/Utilities/ 2021-01-12 12:04:09 +01:00