| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
atest libbrillo_test is the supported method to run the tests.
Fixes: 122332057
Test: none
Change-Id: I3f8fa89773abb4f07badf61e363090bc224879df
|
|
|
|
|
|
|
|
|
|
| |
The comment suggest that the fstat() check is to simplify the logic to
dup2, this patch switch to use base::ShuffleFileDescriptors() to handle
that logic so that we can allow closed fd.
Bug: 121177337
Test: unit tests
Change-Id: I9fdb0cd00fb371ebcd90a3d6e91a353159ab8413
|
|
|
|
|
| |
Test: build update_engine_sideload
Change-Id: I317df5338fe7e8377a9f5d416cc09a99e8d79bc1
|
|\
| |
| |
| | |
Change-Id: I82f93ac199999e8dc1f6998d8c5ae47761d0e47c
|
| |\
| | |
| | |
| | | |
Change-Id: Ia5bd3ae2f826c83f672de8e849fc5ab70abf4ca9
|
| |\ \
| | | |
| | | |
| | | | |
Change-Id: Ibd8d1aae035a59ef816f26c1d4f12fb9759b305e
|
| |\ \ \
| | | | |
| | | | |
| | | | | |
Change-Id: I0670d2a7420072ce5e1e7a2f140fd938ee19473f
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | | |
Change-Id: I858bfc6948fd14cf5b25b987fbe0896d93a36f05
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
Change-Id: I2d43f260e68c8323c30358e4bd626a2ef3f0dbd3
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Change-Id: Ib9c4a03c7a54005af78bfff480620011722f862b
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Change-Id: I329efc1446c2d0a2e304482b9d8e4ee2001c444d
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
am: cfd1fbb90d
Change-Id: I3a01f1c3c627ea6fd1358e839c4f92ca9f1bbc55
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Test: compilation
Change-Id: If75092008dcca5dfbb1683072f03cb1e5fa2e62f
Merged-In: If75092008dcca5dfbb1683072f03cb1e5fa2e62f
|
|\| | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
am: a53a186822
Change-Id: I608703bb6572afc18d5a29562e23cdf1f4dd2120
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Test: Ran tests.
Change-Id: Ia325d252caa1529abc51715855f7a5f81ea04f10
|
|\| | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
am: 0fa01c38cc
Change-Id: Ifc725167753e0e2c9d5a7f966c70fa22329166e3
|
| |\ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Merge Chromium ToT to AOSP:
git fetch aosp upstream-master
git merge -X patience aosp/upstream-master
Bug: 112326236
Test: libbrillo_test
Change-Id: I35fbbddad556b051ce12b9cdd95bb2afef3cf6af
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Modify the DeviceUpdateStagingSchedule policy code to account for the
changes to use JSON strings. Add JSONToListValue to remove repeated
logic between new JSON based policies.
BUG=chromium:858621
TEST=cros_workon_make libbrillo --test
CQ-DEPEND=CL:1158225
Change-Id: I01f73980c5309d77bfe04861255d6665cb7e2e11
Reviewed-on: https://chromium-review.googlesource.com/1142480
Commit-Ready: Lutz Justen <ljusten@chromium.org>
Tested-by: Lutz Justen <ljusten@chromium.org>
Tested-by: Adolfo Higueros <adokar@google.com>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
We move them to libbrillo so it could be shared by
imageloader&dlcservice.
BUG=chromium:866203
TEST=unittest
Change-Id: Id6e1f898d69c5cb1d4d291147482248ee3578f03
Reviewed-on: https://chromium-review.googlesource.com/1147249
Commit-Ready: Xiaochu Liu <xiaochu@chromium.org>
Tested-by: Xiaochu Liu <xiaochu@chromium.org>
Reviewed-by: Xiaochu Liu <xiaochu@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Add a new device policy that will allow administrators to specify a schedule
for rolling out updates to an organizational unit.
BUG=chromium:858621
TEST=Used YAPS as DM server, verified that the new policy is parsed correctly.
CQ-DEPEND=CL:1119162
Change-Id: I72852ddf86e6c7e432aea38a33c6fb3be4c7f315
Reviewed-on: https://chromium-review.googlesource.com/1123683
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: May Lippert <maybelle@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Add a new device policy from chrome_device_policy.proto:
DeviceAutoUpdateTimeRestrictions
BUG=chromium:852860
TEST=libpolicy unit tests
CQ-DEPEND=CL:1136538
Change-Id: Iaef8791f683af00668dcd4041282758cc26b8fbf
Reviewed-on: https://chromium-review.googlesource.com/1101707
Commit-Ready: Adolfo Higueros <adokar@google.com>
Tested-by: Adolfo Higueros <adokar@google.com>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Polymorphic usage of SecureBlob is problematic (see crbug.com/728047).
In some cases we're unnecessarily passing plain Blobs into functions
that take SecureBlobs because we don't have code to create a SecureBlob
from a hex string, so we use base::HexStringToBytes to create a Blob
instead.
This CL does attempt to use HexStringToBytes and then zero out the
memory. As long as we still have polymorphic usage of SecureBlobs,
this is not a big deal. Once we decouple SecureBlob from Blob, we can
improve this implementation.
BUG=chromium:728047
TEST=New unit tests.
Change-Id: Iad94cbd8f574dd35730cb2d68b6ae39798b03ef6
Reviewed-on: https://chromium-review.googlesource.com/1114919
Commit-Ready: Jorge Lucangeli Obes <jorgelo@chromium.org>
Tested-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
When SecureBlob stops inheriting from Blob we'll want to make sure that
functionality continues to work.
BUG=chromium:728047
TEST=New unit tests pass.
Change-Id: I23bbbc37287046ad48ad3b234d752fba934d8d9e
Reviewed-on: https://chromium-review.googlesource.com/1110150
Commit-Ready: Jorge Lucangeli Obes <jorgelo@chromium.org>
Tested-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Add a function that concatenates given Blob's.
This provides analogous functionality of SecureBlob::Combine()
to Blob.
BUG=chromium:728047
TEST=new unit test (BlobTest.CombineBlobs)
Change-Id: I33218bd81a49a265d021e7afdcf438b7fc70921d
Reviewed-on: https://chromium-review.googlesource.com/1089338
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Add routines that allow dumping Blob contents into an
std::string, and, vice versa, constructing Blob from
such a string.
These helpers should simplify writing code that works
with Blob's, and consequently help transitioning away from
SecureBlob (as the latter provides the same capabilities).
BUG=chromium:728047
TEST=new unit test (BlobTest.StringConversions)
Change-Id: I18223a99899216fe07cbf948bef86dce86777f69
Reviewed-on: https://chromium-review.googlesource.com/1076629
Commit-Ready: Maksim Ivanov <emaxx@chromium.org>
Tested-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
When a D-Bus property value is changed, it should emit PropertiesChanged
signal.
BUG=chromium:840517
TEST=None
Change-Id: I414a62b04f4fb1383152375e1efae434c114e2be
Reviewed-on: https://chromium-review.googlesource.com/1049169
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Changing the default value of RollbackAllowedMilestones policy
from 4 to 0 for enterprises (already 0 for consumer devices).
Until the kernel and firmware key versions can be set properly
from Omaha, we don't freeze key rolls by default, only if it's
explicitly specified using enterprise policy.
BUG=chromium:847226
TEST='cros_run_unit_tests --board=caroline --packages libbrillo'
Change-Id: I4451a4e31f475a8b7557fea4f44dc35afe95ef0b
Reviewed-on: https://chromium-review.googlesource.com/1078811
Commit-Ready: Marton Hunyady <hunyadym@chromium.org>
Tested-by: Marton Hunyady <hunyadym@chromium.org>
Reviewed-by: Mattias Nissler <mnissler@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Add an explicit constructor that allows to convert Blob
into SecureBlob.
This should be useful during the transition period while
moving away from SecureBlob - if some code has mixed use
of Blob's and SecureBlob's, then the new constructor will
allow to avoid typing long iterator-based conversions.
BUG=chromium:728047
TEST=new unit test (SecureBlobTest.BlobConstructorTest)
Change-Id: Icad5f0817174f9ec671580dce402a7c361113b6a
Reviewed-on: https://chromium-review.googlesource.com/1076631
Commit-Ready: Maksim Ivanov <emaxx@chromium.org>
Tested-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The second bind is a no-op since it doesn't provide any extra
arguments, so it's just an unnecessary allocation. Also, it looks
like new versions of base::Bind don't like functor objects, so
instead of packaging the callback's environment as part of an
enclosing object we should just bind in the bits we need as
arguments.
BUG=b:37434548
TEST=unit tests
Change-Id: I4bed9857655958f300bc99fa9508f2e940fc4a9a
Reviewed-on: https://chromium-review.googlesource.com/1064880
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
This class is no longer used.
BUG=chromium:361635
TEST=built with FEATURES=test, both with and without dbus
USE flag
Change-Id: I6f96848ba1d137c62396ab2a32b35152ef79040c
Reviewed-on: https://chromium-review.googlesource.com/1026843
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Alex Deymo <deymo@google.com>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Add FileDescriptor(base::ScopedFD&&) and operator=(base::ScopedFD&&) to
create FileDescriptor without calling dup().
Also add release() to take the ownership of the FD without calling
dup().
BUG=None
TEST=build
Change-Id: Id96c3dc76e180bf11b674ad08d7d19f75f854c98
Reviewed-on: https://chromium-review.googlesource.com/1025332
Commit-Ready: Ryo Hashimoto <hashimoto@chromium.org>
Tested-by: Ryo Hashimoto <hashimoto@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
RollbackAllowedMilestones policy values must be between 0 and 4.
Default for enterprise devices is 4, for consumer devices the
value is always 0.
Because DevicePolicy is not available for consumer devices, this
CL adds IsConsumerDevice to PolicyProvider, so update_engine can
check whether it should use the consumer 0 or not set anything if
the policy is not yet loaded.
Not setting anything in the case when the device is still in
OOBE is important because setting a smaller value can permanently
disable rollback to an older version.
BUG=chromium:813036
TEST='cros_run_unit_tests --board=cyan --packages libbrillo'
Change-Id: I228b12ddf3ba05f3230d111ac05d74c0330999c4
Reviewed-on: https://chromium-review.googlesource.com/1013461
Commit-Ready: Marton Hunyady <hunyadym@chromium.org>
Tested-by: Marton Hunyady <hunyadym@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
BUG=None
TEST='cros_run_unit_tests --board=cyan --packages libbrillo'
Change-Id: Id5f30575268a3e9851fcfdfbab9ae7c887877a8c
Reviewed-on: https://chromium-review.googlesource.com/1013485
Commit-Ready: Marton Hunyady <hunyadym@chromium.org>
Tested-by: Marton Hunyady <hunyadym@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
In future libchrome we will have the ability to bind lambdas but
it's considered unacceptable to bind lambdas that carry an
environment. To prepare for this, explicitly state the environment
as bound bare pointers to local variables.
BUG=b:37434548
TEST=unit tests
Change-Id: Id6cd318077de9b5ad253731a107d2cb418323de6
Reviewed-on: https://chromium-review.googlesource.com/1003892
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The PostTask, PostDelayedTask, and DeleteSoon methods on message
loops are gone in the new libchrome, so use the task runner API
instead.
BUG=b:37434548
TEST=emerge
Change-Id: I5a5de39e8a496fb1bed9f0f8c82f06d19a436125
Reviewed-on: https://chromium-review.googlesource.com/1003593
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
This header is gone in future libchromes and we removed all of
the references to dbus::FileDescriptor in previous CLs.
BUG=b:37434548
TEST=emerge
Change-Id: I0034a1fea6c07ce2a3f95702f363d528662e8225
Reviewed-on: https://chromium-review.googlesource.com/1003595
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
The DEBUG_MODE symbol is gone in the new libchrome.
BUG=b:37434548
TEST=emerge
Change-Id: Ic31ca0eb9f9ee78ead1d66ec8f08edbd994e6b3a
Reviewed-on: https://chromium-review.googlesource.com/1003517
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
We don't support this anymore and we have to remove it for the
libchrome uprev anyway.
dbus::FileDescriptor is now dead.
CQ-DEPEND=CL:1000494
BUG=b:37434548
TEST=unit tests, build_packages
Change-Id: I1ca743a2b6f2875eb97c6c95faf4b2717a21e9d1
Reviewed-on: https://chromium-review.googlesource.com/1000725
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
brillo::dbus_utils::FileDescriptor may be used to pass FDs
back out of adaptor code into D-Bus bindings, in which case the
adaptor code does not pass ownership of the FDs to the D-Bus
bindings but the D-Bus FD will probably outlive the lifetime of
the FD in the adaptor code.
To deal with this, we use brillo::dbus_utils::FileDescriptor as a
wrapper around a ScopedFD which dups file descriptors that are
put in. This means adaptor code can pass FDs without having to
give up ownership or manually try to mitigate leaks later, and
does not have to deal with e.g. duping into a ScopedFD at all
callsites.
BUG=b:37434548
TEST=unit tests, use in permission_broker/session_manager/etc
Change-Id: Ic3f139d4af817bb0bbe975cec3855e44a09bcda9
Reviewed-on: https://chromium-review.googlesource.com/987197
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
BUG=chromium:812468
TEST=Unit test added
Change-Id: I797852ffc456894d845b388feff1de56b922e49b
Reviewed-on: https://chromium-review.googlesource.com/974907
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
This allows us to default-construct the struct so a pointer to
one can be passed to D-Bus callers as an out-argument.
BUG=chromium:821633
TEST=compile new bindings with permission_broker
Change-Id: I1c94d66c24d493a8e35c23724c316cb17bd22fa2
Reviewed-on: https://chromium-review.googlesource.com/976870
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Add two new device policies from the chrome_device_policy.proto:
- rollback_to_target_version
- rollback_allowed_milestones
BUG=chromium:813036
TEST='FEATURES=test emerge-cyan protofiles libbrillo' and 'cros_run_unit_tests --board=cyan --packages libbrillo'
CQ-DEPEND=CL:960382
Change-Id: Ie408ed993fe02f904c511a35837804ac9ff518f9
Reviewed-on: https://chromium-review.googlesource.com/923971
Commit-Ready: Marton Hunyady <hunyadym@chromium.org>
Tested-by: Marton Hunyady <hunyadym@chromium.org>
Reviewed-by: Pavol Marko <pmarko@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
StringValue is type aliased to base::Value now, so we should
move to explicit base::Value to avoid breaking when we uprev
libchrome.
BUG=b:37434548
TEST=unit tests
Change-Id: I77b4354ff63d71186c74deb5a5b0bc925a577653
Reviewed-on: https://chromium-review.googlesource.com/953648
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
ExportedObjectManager subscribes to signals on interface
org.freedesktop.DBus.ObjectManager. In D-Bus forwarding case, it may
receive expected signals from the forwarded service about
InterfacesAdded and InterfacesRemoved but it would be logged as
unexpected method calls and pollute the logs. There needs to be a way to
freely attach method handlers to the expected methods so we can handle
them instead of unnecessarily polluting the logs.
BUG=chromium:812468
TEST=Tested with Bluetooth daemon D-Bus forwarding
Change-Id: Ifb26a2d7ce800fde4311b18efe36ab5110f0dae4
Reviewed-on: https://chromium-review.googlesource.com/958325
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
In OnInit the message loop may not be instantiated yet, so if
some initialization has to happen asynchronously it might have
any task runner to post tasks to. Allow subclasses of Daemon to
provide a method implementation with initialization that must
take place when the message loop has started and is the current
message loop.
BUG=b:74250103
TEST=with modemfwd
Change-Id: I4c9a35934681a24730b01b60e9bca5e853e104ef
Reviewed-on: https://chromium-review.googlesource.com/959524
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
D-Bus specification allows interfaces to be added or removed even after
an object is exported. This CL adds the support to libbrillo's D-Bus
library to do this.
This is needed by the new Bluetooth daemon which is going to impersonate
BlueZ's ObjectManager and BlueZ may add/remove interfaces of an object
dynamically.
BUG=chromium:812468
TEST=Tested with Bluetooth daemon
Change-Id: Ia72735bfd28082cf6c43d1e774beb912fa60ec2d
Reviewed-on: https://chromium-review.googlesource.com/956745
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Add serialization and deserialization for the FD types used by
the new libchrome D-Bus bindings, and plumb those through the
method invoker as well.
CQ-DEPEND=CL:956622
BUG=b:37434548
TEST=unit tests
Change-Id: Ice58ecd307da253cd073be83c7805e68fb9c6edf
Reviewed-on: https://chromium-review.googlesource.com/956623
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Eric Caruso <ejcaruso@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
You can return std::unique_ptr<Derived> when the return value is
declared as std::unique_ptr<Base> if Derived <: Base, so there is
no reason not to use std::make_unique here. Also, since libchrome
inlined FundamentalValue into Value, we can explicitly use those
constructors instead.
BUG=b:37434548
TEST=emerge
Change-Id: Ia30bcec79c7b618d0051bf7c054858684327685f
Reviewed-on: https://chromium-review.googlesource.com/949663
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
When an enum is used to define bitwise flags that are meant to be
combined (FLAG_ONE | FLAG_TWO), the resultant value needs to be cast
back to the enum type in order to be stored in a variable of the same
type as the enum (as the result is a value of underlying_type of the
enum).
This adds a macro that allows templated bitwise operators to be defined
so that the enumerators can be used more cleanly in code, while
preserving type-safety.
BUG=b:37434548
BUG=chromium:815356
TEST=unittests
(cherry picked from commit 1d20c7da0b8833ffda7dfff2066205ea1af7e771)
Change-Id: I35b2a5b99fe87d63f1d0a0c01fba03e7b2f9a58b
Reviewed-on: https://chromium-review.googlesource.com/941982
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
This CL is to allow clients of DBusObject to implement their own custom
property method handlers (GetAll/Get/Set). Possible use cases include:
* handling Set method call to be forwarded to another D-Bus service
* handling Set method call to trigger some operation other than setting
the property value itself.
* handling Get method call to return a value which is a function of
other properties' values.
BUG=chromium:812468
TEST=Tested with Bluetooth daemon that forwards Set method call.
Change-Id: I8294dc46885b2105adceb9c144f4d603185e49ff
Reviewed-on: https://chromium-review.googlesource.com/939263
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
|