Age | Commit message (Collapse) | Author |
|
Fix the bug introduced by 14dd66b0a440eb1a97e41f2086051bac747fd50a.
'includes' includes a gyp file. include_dirs is the list of directories
to include.
TEST=`emerge-gizmo libchromeos` works with this change.
Change-Id: I2b606713e53b4775a78bdcb6f66fe15c4b94ca45
|
|
minijail.h was updated to include libminijail.h instead of
chromeos/minijail.h.
This change must be reflected in the gyp file.
Change-Id: I8ae80e8878b8d09a90768a8f2b10c8be7eb3f2eb
|
|
MessageLoopRunUntil is defined in message_loop_utils and is needed by
chromeos/streams/file_stream_unittest.cc.
Change-Id: I5bd7aa17652874a2f8fa9b0ac111184499400a4f
|
|
Allows parser to deserialize a variant value from a non-variant
type value.
BUG=chromium:519576
TEST=emerge-$BOARD libchromeos shill
TEST=Verify with wifi autotests against shill with chromeos dbus
Reviewed-on: https://chromium-review.googlesource.com/292056
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
(cherry-picked from
https://chromium.googlesource.com/chromiumos/platform2 at
e4fffa682cd9d22642d0fec7fa55ac970e57cc91)
Change-Id: Ic40865a39ede3d635e704dddb22cf995349aeaa8
|
|
When DBus object is unregistered explicitly, it allows its path to be
reused.
BUG=chromium:518026
TEST=emerge-$BOARD libchromeos shill
TEST=Verify using shill with chromeos dbus
Reviewed-on: https://chromium-review.googlesource.com/291841
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
(cherry-picked from
https://chromium.googlesource.com/chromiumos/platform2 at
5688fbaf4aeb195c6915d3f362b888e549b7a010)
Change-Id: I77d88089b687df85afd78ebe0178040f24be8a31
|
|
Read[All]Async and Write[All]Async would first call WaitForData()
before attempting to read/write from the Stream. In some cases, such asi
the FileStream implementation using a BaseMessageLoop
(base::MessageLoopForIO, implemented using libevent/epoll) we can't
WaitForData() on a file descriptor if it never blocks. A regular file
or a block device are common examples of a file descriptor for wich
we can't call MessageLoop::WatchFileDescriptor() in that implementation.
This CL prevents this scenario by calling first ReadNonBlocking() or
WriteNonBlocking() and then falling back to WaitForData() only if
ReadNonBlocking() or WriteNonBlocking(), respectively, return a
situation in which the Blocking call would actually block.
BUG=chromium:499886
TEST=Updated unittests.
Reviewed-on: https://chromium-review.googlesource.com/291092
Tested-by: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
(cherry-picked from
https://chromium.googlesource.com/chromiumos/platform2 at
cd6dfe22ffaf6322b33bbf2e1f1322093d67a46e)
Change-Id: Iba97e384e9fb5aa7827b68e11135b396dcda67ed
|
|
This allows shill to maintain its current behavior regarding to
DBus object registration.
BUG=chromium:517721
TEST=emerge-$BOARD libchromeos shill
TEST=Verify with shill using chromeos dbus
Reviewed-on: https://chromium-review.googlesource.com/291432
Commit-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
(cherry-picked from
https://chromium.googlesource.com/chromiumos/platform2 at
2962f062990d2b04646c84def2284e607f9d1113)
Change-Id: Id1379008e82a34c1ccf8e21d4c1d3393aa207081
|
|
The added MockMessageLoop is a mockable FakeMessageLoop. By default the
mock object will behave like a fake one, but it is also possible to set
expectations on the MessageLoop methods.
The MockMessageLoop now replaces the base::TaskRunner used in
FakeStream and runs the posted callbacks from the message loop instead
of running them when they are posted.
libweave is updated to create the FakeStream using a
chromeos::MessageLoop.
BUG=chromium:499886
TEST=FEATURES=test emerge-link libchromeos libweave buffet
Reviewed-on: https://chromium-review.googlesource.com/290632
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
(cherry-picked from
https://chromium.googlesource.com/chromiumos/platform2 at
78c174362c0ce8f75c53ab37da1874533eb1a56a)
Change-Id: I5b6952fc75e7300e9734e6f8f8103fe684584712
|
|
This patch replaces the calls to base::MessageLoopForIO with calls to
chromeos::MessageLoop in the Stream classes. This allows to use Streams
with other message loops.
BUG=chromium:499886
TEST=Unittests updated.
Reviewed-on: https://chromium-review.googlesource.com/290541
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
(cherry-picked from
https://chromium.googlesource.com/chromiumos/platform2 at 8f3af00c53aef99d1f7fab2f1d8035a9b5b4f7e9)
Change-Id: I04c78b0dc258a2eff9ab0b4eb8559f4f02feab46
|
|
It has a minijail dependency, and that doesn't build on the Mac.
Change-Id: I7878bd8139f121fea1bc9f3163fcd3bb637e00a7
|
|
Also fix a bunch of comments. "Target" in this context does not
refer to the build target (e.g 'libchromeos') but to the fact that
it's building *for* the target architecture (e.g. ARM) and not for
the host.
Bug: 22557394
Change-Id: Icabcb28809a46b74c3d5b4e8bd1975dda684598a
|
|
libchromeos provides fakes and mocks for unit tests that need to rely
on libchromeos-provided functionality. For other clients to be able
to use those fakes/mocks, they need to be provided as a library.
Created a libchromeos-test-helpers static library the way it was done
on CrOS.
BUG:22948980
Change-Id: Idd60b052bbc4c5ee3d99492c743499cb74656ca4
|
|
Because of the interdependence of Any and the DBus bindings, it is
difficult to build one without the other.
Bug: 22880161
Change-Id: Icc8d70f0ea34cf1d9869672743fbe7ce0f825a78
|
|
Bug: 22880161
Change-Id: I7a7c30abb4776e3bd1986f0453d49a9943e94449
|
|
This builds the shared libraries for:
* libchromeos-core
* libchromeos-http
* libchromeos-streams
* unit tests for libchromeos-core
* unit tests for libchromeos-http
* unit tests for libchromeos-streams
Some files were dropped due to a lack of support:
* user_db (no user on android).
* dbus specific parts of libchromeos-core.
BUG: 22372020
Change-Id: Ib8125992ccfcd03156e7234c6ccda6b017261539
|
|
In android, binaries are in /system/bin instead of /bin.
BUG: 22372020
Change-Id: Ie1d94a317ad8126328db2d9bf2540bba6fbf5850
|
|
On android, glib is not available so the test runner has to be adapted.
As the test runner is small, instead of guarding the glib commands with
defined() statement, create an android specific testrunner.
BUG: 22372020
Change-Id: I4e5117243aa320975d79f2ff9f09d70f9836474b
|
|
|
|
|
|
PLOG(ERROR) will print the error message based on errno. This patch
replaces "LOG(ERROR) << ... << errno" with "PLOG(ERROR) << ..." in the
Process.
BUG=None
TEST=Running a command that doesn't exists shows the error message on
stderr.
Change-Id: Id55a9a37b1e478103c23b8017dc7444de3e8ed18
Reviewed-on: https://chromium-review.googlesource.com/288783
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
|
|
When using ProcessImpl::BindFd the parent_fd is set to -1. This causes
the process to call close(-1) which will silently fail. This patch
avoids calling close on the parent_fd when it is -1 so we don't issue
a known bad call to close. This makes it easier to debug problems when
running such program with strace.
BUG=None
TEST=Unittests still pass.
Change-Id: I3a69fca21a4ba4a5911897b13a95bdeffd53d3cf
Reviewed-on: https://chromium-review.googlesource.com/288782
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
|
|
bootstat should not be compiled with libchromeos.
This also replaces the old Makefile with a gyp file.
BUG=None
TEST=Unittests
TEST=trybot run on lumpy-incremental daisy link gizmo chromiumos-sdk.
CQ-DEPEND=CL:289240
Change-Id: I0c11fa53edbec6c8be9aa93ba8ebc38a051fac79
Reviewed-on: https://chromium-review.googlesource.com/289214
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
|
|
Both chromeos::AsynchronousSignalHandler and chromeos::Daemon
implemented the same Register/Unregister interface for signal handlers.
This patch moves that functionality to an abstract interface and makes
chromeos::ProcessReapper use that instead of having two methods.
BUG=None
TEST=Unittests still pass.
Change-Id: Ib2aa8c5279b5998e7c88c2211809901fa11a8f0a
Reviewed-on: https://chromium-review.googlesource.com/288752
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
|
|
This patch ports the ProcessReaper class previously used in germ to
libchromeos with a base::Callback interface. This class allows you to
wait for a child process in the message loop, similar to what the
g_child_watch_add() function does in glib. This class is compatible
with both GlibMessageLoop and BaseMessageLoop.
BUG=chromium:361635
TEST=Added unittests.
Change-Id: Ia40246729c99a487fdf0039a28b30ba92f0e7da4
Reviewed-on: https://chromium-review.googlesource.com/288259
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
|
|
This patch makes AsynchronousSignalHandler use the chromeos::MessageLoop
interface instead of rely on the message loop being the
base::MessageLoopForIO.
BUG=chromium:499886
TEST=FEATURES=test emerge-link libchromeos
Change-Id: Ib206e99ca48098d1998725c8103c271e7b808a6d
Reviewed-on: https://chromium-review.googlesource.com/287001
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
|
|
In order to use chromeos::MessageLoop::curent() we need to have an
instance created and set as default. This patch creates the wrapper
for base::MessageLoopForIO in chromeos::Daemon so daemons can use
either interface.
This patch also runs the base::MessageLoopForIO via the
chromeos::MessageLoop wrapper so calls to
chromeos::MessageLoop::BreakLoop() work as expected. This methods was
updated to not use the deprecated Run/QuitNow() methods in the
base::MessageLoop interface and use a base::RunLoop instead.
BUG=chromium:506052
TEST=`FEATURES=test emerge-link libchromeos` still works.`
Change-Id: I16188e399a48923e398fb621875debff01accea7
Reviewed-on: https://chromium-review.googlesource.com/286825
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
|
|
BUG: 22372020
Change-Id: I67389d0bd857d25785d325a073aea7eeb6d5bf35
|
|
BUG:22205433
|
|
BUG=None
TEST=unittests.
Change-Id: I4b91d46fb23027034f13d391e8eabb116ed54535
Reviewed-on: https://chromium-review.googlesource.com/287763
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
|
|
If we attempt to spawn a process to run an executable, fail early
instead of waiting for the call to fail.
BUG=None
TEST=unittests pass.
TEST=trybot run on daisy, link, lumpy, mips.
Change-Id: I1742101eb47787b948b20d4129a8b1893dba0568
Reviewed-on: https://chromium-review.googlesource.com/287864
Reviewed-by: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
|
|
Running the process with Start instead of Run before checking the output
make it possible to read the output before the program exits.
BUG=None
TEST=`FEATURES=test emerge-gizmo libchromeos --nodeps` works.
Change-Id: I021b2d6d03fb8d99fd0673ed37746d23c11bf2cb
Reviewed-on: https://chromium-review.googlesource.com/287891
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
|
|
Use ScopedUniqueTempDir instead so that the unittests can be run from
anywhere.
BUG=None
TEST=`FEATURES=test emerge-gizmo libchromeos --nodeps` works
Change-Id: Ic32473835c72e268ab04c025159c67f11f0f99b0
Reviewed-on: https://chromium-review.googlesource.com/287890
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
|
|
Just to highlight that this is not implemented.
BUG=none
TEST='FEATURES=test emerge-gizmo libchromeos'
Change-Id: If498509b6a575001086613afe9402936d62be218
Reviewed-on: https://chromium-review.googlesource.com/287844
Trybot-Ready: Vitaly Buka <vitalybuka@chromium.org>
Tested-by: Vitaly Buka <vitalybuka@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
|
|
modp_b64 is now compiled separately in dev-utils/modp_b64. We can remove
the code from libchromeos and link against it in libchromeos.gypi.
BUG=chromium:510532
TEST=`cros_run_unit_tests --board=gizmo --packages libchromeos` works.
CQ-DEPEND=CL:285937
Change-Id: I8ca33009fe06151accc015bdc9c692f53c043311
Reviewed-on: https://chromium-review.googlesource.com/286012
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Arman Uguray <armansito@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
|
|
We should not rely on the fact that string copy might be done lazily.
BUG=None
TEST=`FEATURES=test emerge-gizmo libchromeos --nodeps` works.
Change-Id: Ie0a798b9be6347a715203b291d083757f8d66510
Reviewed-on: https://chromium-review.googlesource.com/287503
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
|
|
Don't rely on bash for sh functionality. This allows the unittests to
run on system that don't have bash.
BUG=None
TEST=`FEATURES=test emerge-gizmo libchromeos --nodeps` works.
CQ-DEPEND=CL:287404
Change-Id: Icf3ae17a9a4f0553e5c623927d25d60303b88306
Reviewed-on: https://chromium-review.googlesource.com/287405
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
|
|
Instead of relying on cp's error message to test stderr handling in
chromeos/process.cc, print to stderr by redirecting echo.
BUG=None
TEST=`FEATURES=test emerge-gizmo libchromeos --nodeps` works.
Change-Id: I2454f060ceeca4ebd2e2b276613d3d2d3730f814
Reviewed-on: https://chromium-review.googlesource.com/287404
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
|
|
dca2caf2ea0d27d1abd0e47f1dbf509bb627dd6c changed the behaviour of
Process to not fail when the output file already exists.
The test should be remove too.
BUG=None
TEST=FEATURES=test emerge-gizmo libchromeos --nodeps
Change-Id: I6495190cf347c8f7dc8eb9f8bd57f01b6d15591e
Reviewed-on: https://chromium-review.googlesource.com/287403
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
|
|
The new chromeos::BaseMessageLoop implementation uses the existing
base::MessageLoopForIO implementation, that in the Linux and ChromeOS
context uses base::MessagePumpLibevent, a libevent based implementation.
This chromeos::MessageLoop allows to mix calls to base::MessageLoopForIO
and chromeos::MessageLoop with few limitations. This is useful when using
other code in libchrome that already interacts with libchrome's
MessageLoopForIO.
Among the limitations, the support for canceling a task will not free
the memory associated with the delayed event until it actually fires.
Also, base::MessagePumpLibevent uses epoll(7) which doesn't support
watching for file descriptors that would not naturally block (such as
regular files). Attempting to watch for those file descriptors will
return kTaskIdNull in this implementation, but would work on
chromeos::GlibMessageLoop.
This patch moves most of chromeos::GlibMessageLoop existing tests to a
common chromeos::MessageLoop test that runs for both implementations.
BUG=chromium:506052
TEST=Added unittests.
Change-Id: I4553d149511806ed599fa2847af4372985456106
Reviewed-on: https://chromium-review.googlesource.com/285217
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
|
|
When importing a libchromeos header in libchromeos or in another
package, don't prefix the import path with libchromeos/.
The headers for the libchromeos shared library are installed in
/usr/include/chromeos.
Using libchromeos/chromeos/* will use the headers from
src/platform2/libchromeos which may not match the .so.
BUG=None
TEST=cros_workon-gizmo start libchromeos germ feedback &&
./build_packages --board=gizmo
TEST=`cros_run_unit_tests --board=gizmo --packages "libchromeos germ
feedback"` succeeds.
Change-Id: I027d41c6013872887eaed572e2065f936a7b4fd0
Reviewed-on: https://chromium-review.googlesource.com/285772
Reviewed-by: Dan Erat <derat@chromium.org>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
|
|
BUG=None
TEST=cros_run_unit_tests --board=gizmo libchromeos.
Change-Id: I9fb3b8ce6c6f5938e39fb1bd7ede1ce2a18c9fec
Reviewed-on: https://chromium-review.googlesource.com/285850
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Trybot-Ready: Bertrand Simonnet <bsimonnet@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
|
|
In order to help with tracking HTTP requests and responses,
moved "noise" log messages from VLOG(1) to VLOG(2) and made sure
that each async request ID is logged before the request is dispatched
and also when response is received, the request ID is also logged so
it is easy to identify the matching request-response pairs.
BUG=None
TEST=`FEATURES=test emerge-link libchromeos`
Change-Id: I481ce25c8b3f2867ac8036c13bbee91bc8f6f838
Reviewed-on: https://chromium-review.googlesource.com/285744
Trybot-Ready: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Vitaly Buka <vitalybuka@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
|
|
This cleans up the dependency tree for daemons linking libchromeos
so that only those that actually need glib link against it.
BUG=chromium:508218
TEST=trybots
Change-Id: Iec92f061ae00b81bc440f4c58082adc6cdb059a3
Reviewed-on: https://chromium-review.googlesource.com/284079
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Christopher Wiley <wiley@chromium.org>
Tested-by: Christopher Wiley <wiley@chromium.org>
|
|
When watching for a file descriptor, guaranties are that the callback
will be called if a call to read() or write() (depending on what are
you watching for) will not block even if the file descriptor doesn't
have the O_NOBLOCK flag set. This is normally because there is data to
read or it is possible to write data, but can also be because the
file descriptor is closed (invalid) or the end of file or device is
reached. In the last two cases, a read() or write() will return
immediately with an error or a value of 0, but won't block.
This patch makes GlibMessageLoop implementation watch for those cases
as well.
BUG=None
TEST=Added unittests.
Change-Id: I7d9d7671165ebf08b459cfff5d52bd09e6daabc1
Reviewed-on: https://chromium-review.googlesource.com/284711
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
|
|
|
|
This patch extends the chromeos::KeyValueStore to support loading and
saving from strings directly.
BUG=None
TEST=Updated unittests.
Change-Id: I2b33cc9d427bba7b51733db3068cba08071c7b2b
Reviewed-on: https://chromium-review.googlesource.com/282380
Tested-by: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
|
|
Later, kids.
BUG=None
TEST=None
Change-Id: If9c1fdf42b38536b0fd0b4495281673d750407a3
Reviewed-on: https://chromium-review.googlesource.com/282760
Commit-Queue: Chris Masone <cmasone@chromium.org>
Trybot-Ready: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
|
This patch introduces a simple I/O watching method to the MessageLoop
interface following the pattern used by shill and what glib and libevent
can offer as implementation backend. This also includes implementations
for the GlibMessageLoop and the FakeMessageLoop.
BUG=brillo:91,chromium:402066
TEST=Added unittest to validate GlibMessageLoop.
Change-Id: I0a0032bc40f6fd046b8b98076e0f553cdcd69051
Reviewed-on: https://chromium-review.googlesource.com/282110
Reviewed-by: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
|
|
Instead of using openssl's base64 encoder/decoder, import modp_b64 and
use it. modp_b64 is imported from chromium.
This removes the dependency of an interface of openssl that is not
available in boringssl.
BUG=None
TEST=unittests.
TEST=trybot runs.
CQ-DEPEND=CL:281990
Change-Id: Idccab41cecbbe6ca5f2bec5ff20ffc75d5a0fab4
Reviewed-on: https://chromium-review.googlesource.com/281991
Tested-by: Bertrand Simonnet <bsimonnet@google.com>
Tested-by: Bertrand Simonnet <bsimonnet@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Bertrand Simonnet <bsimonnet@chromium.org>
|
|
The GlibMessageLoop implementation uses the default context to help
integrate with source that access both the glib main loop directly and
via the chromeos::MessageLoop interface. This means that tasks scheduled
with one GlibMessageLoop instance will run even from another instance of
the same class in the same thread. To prevent leaking callbacks between
GlibMessageLoop instances, such as the ones created for unittests, this
patch removes and logs all the leaked pending callbacks when the
instance is destroyed.
BUG=chromium:499886
TEST=Ran update_engine tests that leaked callbacks and saw the warnings.
Change-Id: I94ac97da1e342a3aa58400de5b2d5cf05463aa32
Reviewed-on: https://chromium-review.googlesource.com/281445
Tested-by: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
|