summaryrefslogtreecommitdiff
path: root/base
AgeCommit message (Collapse)Author
2016-06-02libchrome: Fix the build in OS X > 10.10android-wear-n-preview-2android-wear-7.1.1_r1android-n-preview-5android-n-preview-4android-n-iot-preview-2nougat-mr1-wear-releasen-iot-preview-2Luis Hector Chavez
For some reason, there is a conflict in the forward declaration of NSUserActivity. This allows newer versions of OS X than what the buildbots have to be able to build libchrome. Bug: 28985443 Change-Id: I3ba3af04fcaba086862f3114250324348c0c9cf2 Test: mmma -j external/libchrome # in El Capitan
2016-06-01libchrome: Remove some Mac forward declarations.Luis Hector Chavez
These are causing problems in Android. Change-Id: I21a78391a770646a418d57e062dc47bf5f2ab7f2
2016-06-01libchrome: Add more OSX filesLuis Hector Chavez
Even more files are needed. Change-Id: I9eb75819e952b804efdd7486951525cba8e5c948
2016-06-01libchrome: More OSX mitigationsLuis Hector Chavez
The shim allocator is not supported in OSX. Don't select it when building for it. Change-Id: Ib8fb23c44a79f3b500509fc68f8c5b869bd4fa6e
2016-06-01libchrome: Fix mac build breakLuis Hector Chavez
A file was missing. Change-Id: I54622c5697d8d3d9f5c719aab2f98fc0575ae712
2016-05-27libchrome: Uprev the library to r395517 from ChromiumLuis Hector Chavez
Pulled the latest and greatest version of libchrome from Chromium. The merge was done against r395517 which corresponds to git commit ebdcb576bb346af95b8ad219f6250daf63122f98 of May 23, 2016 Notable changes are: - scoped_ptr was removed in favor of std::unique_ptr - base/thread_task_runner_handle.h was moved to base/threading. BUG: 28985443 TEST: All tests in libchrome_test pass on dragonboard-eng build Change-Id: Ic9f9ed1cafe754c96cd2f007984514e091aaba39
2016-04-13Defer to libbase macros on AndroidChristopher Wiley
On Android, prefer the libbase definitions of macros. This prevents compiler errors about macro redefinition. Allow consumers of libchrome to see libbase headers implicitly by exporting headers on libbase's include path. Fix a small bug in how libchrome-dbus was defined. It needs to export libchrome's headers, since to work with libchrome-dbus, you need all the headers necessary to consume libchrome as well. Bug: 28117776 Test: Compiles Change-Id: I35e969d7037d3374af9d2e931814740e29691029
2016-04-11Only define DISALLOW_IMPLICIT_CONSTRUCTORS if undefinedChristopher Wiley
This fixes a conflict with Android's libbase over who gets to define this very uninteresting macro. Bug: 28117776 Change-Id: I9ef69957d0ba1469225c9701a8355d43f64d6eee Test: Compiles.
2016-03-21libchrome: Add missing Mac files. Attempt 2android-n-preview-2Alex Vakulenko
This is to fix an AOSP build break on Mac host. Change-Id: I6c8e28ded5639b647a5674ea3da7d7401f71380b
2016-03-21libchrome: Fix unused parameter error on Mac buildAlex Vakulenko
Change-Id: If20d7b230d1fa21c753bf50b8dcdb29e0932c7ad
2016-03-21libchrome: Add missing Mac files. Attempt 1Alex Vakulenko
This is to fix an AOSP build break on Mac host. Change-Id: I3d2a361a09dc4a78fef6bbcc4183318b970e639f
2016-03-21Update libchrome to r381699Alex Vakulenko
TEST=Build all Change-Id: I962a83a044a102515c316d04bb65e7c9302e0f0c
2016-03-03Work around race in ProcessMetricsTest.GetOpenFdCountandroid-n-preview-1Christopher Wiley
When we run this test on builders, we sometimes see that the child is holding an FD open after signalling that all open FDs have been closed. This is potentially the FD of file being used to signal that all FDs are closed. Bug: 27434105 Test: This test still passes. Change-Id: I229677f8b0a7eb6bc3c6d9c9d56dd8b05e8fde70
2016-03-02Add some debug logging to libchrome_test in case of flakeChristopher Wiley
It is difficult to reproduce the listed bug, so just get some debug output when we encounter it on the builder. This change can/should be reverted later. Bug: 27434105 Test: commented out logic to close fds, ran this against an emulator locally, saw that it printed open fds in a useful way before failing. Change-Id: I859e8ccd344dd4afc9a6c582472c479da5960903
2016-02-22libchrome: fix -Wexpansion-to-defined warningbrillo-m10-releasebrillo-m10-devYunlian Jiang
This fixes the -Wexpansion-to-defined warning BUG=chromium:587491 TEST=it builds with latest clang. Change-Id: I2ee6a9c4ea47450f8ec352746d48fd5b3eaf6af1
2016-02-16Make MessageLoopForIO::current() failure explicit.Alex Deymo
When calling MessageLoopForIO::current() without a message loop set and with debug checks enabled, a DCHECK() will dereference a null pointer causing the program to segfault. This patch makes the failure evident adding another DCHECK() with a clear message. Bug: None TEST=FEATURES=test emerge-link libchrome Change-Id: If69d2e07d0bd93a78001be3e683159380bdd5ff1
2016-01-25libchrome: Add files needed by some veyron variants on Chrome OSAlex Vakulenko
These files are needed for Chrome IPC. These will be compiled on Chrome OS, so no impact on AOSP. BUG: 26772882 TEST: make -j32 for dragonboard ./build_packages on CrOS for various boards. Change-Id: Ibca0a04692a59f245cab2d5c9707cff109ca144f
2016-01-22libchrome: Fix libchrome build on Chrome OSAlex Vakulenko
Applying libchrome r369476 changes to Chrome OS-only files from the upstream of libchrome (from Chromium). Also modified SConstruct to add new files and remove deleted files. Change-Id: Id22160e32d19b0bb228903e3df372fb82550626c
2016-01-22libchrome: Revert deleted files needed by Chrome OSAlex Vakulenko
Some of the "unused" files were apparently needed for building libchrome on Chrome OS. Reverting deletion of these files. Change-Id: I02e32f112d16480206f43ca0087342a9de7f1e1b
2016-01-20libchrome: Fix Mac buildAlex Vakulenko
The recent uprev attempt missed a couple Mac-specific files. Adding them now. Also, there were some other build breaks in Mac files. Particularly, had to revert the uprev change to the following file base/message_loop/message_pump_mac.mm because the change relied on base::mac::CallWithEHFrame() which was implemented in assembly and didn't compile on 32 bit platform. So, I have removed the change introduced with https://codereview.chromium.org/1212093002 on Chromium side. Change-Id: Ic78acbb22732e64965f99ce31bc8382f228e22bb
2016-01-20Restore MessagePumpGlib filesAlex Vakulenko
These are apparently used on Chrome OS and were deleted from AOSP by mistake... Recovering. Change-Id: I257eee62a27d1dbb6029c776ac56af78ca110213
2016-01-20libchrome: Uprev the library to r369476 from ChromiumAlex Vakulenko
Pulled the latest and greatest version of libchrome from Chromium. The merge was done against r369476 which corresponds to git commit 0471d0e2e2ef4a544a63481a389e1df33ea7c00a of Jan 14, 2016 Notable changes are: - base::scoped_ptr<T> is now almost identical to std::unique_ptr<T> No Pass() method, now std::move() is used on scoped pointers - basictypes.h is removed and custom int types such as int32 are now replaced with the standard int32_t and similar from <stdint.h> - String utility functions are cleaned up/refactored. Now all are in base:: namespace, many now return values rather than take pointers for results, ambiguous Booleans are replaced with enums, such as: base::StartsWithASCII(current_url, "https://", false); now is: base::StartsWith(current_url, "https://", base::CompareCase::INSENSITIVE_ASCII); - COMPILE_ASSERT() is now replaced with standard static_assert() - Numeric range constants such as kuint64max are removed in favor of standard <limits> constructs such as std::numeric_limits<uint64_t>::max() - base::Value and derived classes use scoped_ptr<> more and support for raw pointers to base::Value is deprecated and/or removed in many places. - base::MessageLoopProxy is completely removed (was marked deprecated before) - base::MessageLoop::Quit() and QuitClosure are renamed to QuitWhenIdle and QuitWhenIdleClosure for more semantic clarity. Change-Id: I1f5436d253a0a32b2299160a76993752d818736f
2016-01-20libchrome: Delete unused source filesAlex Vakulenko
In order to help with uprev maintenance, remove all the source files that are not being built on AOSP/ChromeOS Change-Id: Iec3221ae8aa02a17326949085b33925382968673
2015-12-30Fix sign promotion errorsChristopher Wiley
These turned out be be entirely related to logging enum values, where the compiler would get confused about the overload to pick among the signed/unsigned/long/int stream operators. Fix this by providing a special template specialization that is enabled only for enum types. Special thanks to avakulenko@ who suggested this fix. Bug: 26228533 Test: Compiles under gcc/clang Change-Id: If0eb6ea8f2998fc826387816d54882462e526650
2015-12-30Fix mac specific warningsChristopher Wiley
Fix a number of unused parameter warnings and two uninitlialized member warnings. Bug: 26228533 Change-Id: I46e40115c1087882821a51a978591d013f911b73 Test: Compiles on mac for x86_64-eng
2015-12-30Fix no-missing-field-initializers warningsChristopher Wiley
Bug: 26228533 Test: Compiles under clang/gcc, unittests pass for same Change-Id: I1cd4f5b7307f2316b2b55e8823382d52cf641826
2015-12-30Fix non-virtual-dtor warningsChristopher Wiley
Bug: 26228533 Change-Id: I93cc73f395d3be10fe873bc14e39644371f0fbca Test: Compiles under clang/gcc
2015-12-30Fix unused parameter warnings in libchromeChristopher Wiley
Bug: 26228533 Test: libchrome builds under clang and gcc with this change Change-Id: Ie534056c7557652fbbd7c2a134131d1cd25824e5
2015-12-29Revert "Fix compiler warnings in libchrome"Christopher Wiley
This reverts commit b636ff6a8ac3b54b3067289f01848252ab71eceb. This broke trunk with messages like: In file included from external/libchrome/base/time/time_posix.cc:29:0: external/libchrome/base/lazy_instance.h:51:36: error: missing initializer for member 'base::LazyInstance<base::Lock, base::internal::LeakyLazyInstanceTraits<base::Lock> >::private_instance_' [-Werror=missing-field-initializers] #define LAZY_INSTANCE_INITIALIZER {} ^ external/libchrome/base/time/time_posix.cc:39:38: note: in expansion of macro 'LAZY_INSTANCE_INITIALIZER' g_sys_time_to_time_struct_lock = LAZY_INSTANCE_INITIALIZER; ^ external/libchrome/base/lazy_instance.h:51:36: error: missing initializer for member 'base::LazyInstance<base::Lock, base::internal::LeakyLazyInstanceTraits<base::Lock> >::private_buf_' [-Werror=missing-field-initializers] #define LAZY_INSTANCE_INITIALIZER {} ^ external/libchrome/base/time/time_posix.cc:39:38: note: in expansion of macro 'LAZY_INSTANCE_INITIALIZER' g_sys_time_to_time_struct_lock = LAZY_INSTANCE_INITIALIZER; ^ cc1plus: all warnings being treated as errors Change-Id: I0c0308e716bd1ed7914e2a032e439a9261d38e56
2015-12-29Fix compiler warnings in libchromeChristopher Wiley
Also fix compiler warnings in unit tests, except for unused parameter. There are a ton of unused parameters in unit tests, and those errors have no risk of spreading through the platform. Bug: 26228533 Test: libchrome builds, unittests pass Change-Id: I50431c8e143902c4b71b4381e4dbbc67cdc4507c
2015-12-22Remove dynamic annotationsChristopher Wiley
This is an outdated library that added support for thread/memory safety annotations before clang was extended to support the same. We don't run those tools on Chrome OS or Android, and it is easiest just to remove the library and includes. Bug: 26253162 Test: Compiles, libchrome unittests pass, brilloemulator_arm64 builds Change-Id: I72f3bdad82fa830c9c76922d98b16dfeebfb5389
2015-12-22Remove base/third_party/valgrind headersChristopher Wiley
Replace usages of these headers with includes to the Android tree provided valgrind headers. On Chrome OS, since we don't have that luxury, we will need to drop the previous headers back in the ebuild. Bug: 26253162 Test: Compiles, unittests pass on Android host Change-Id: I2848d6cb0e7bc8d0430766f9ad5298953e6d59be
2015-12-22Remove base/third_party/symbolize libraryChristopher Wiley
We don't actually compile this in on either Chrome OS or Android. Bug: 26253162 Test: Compiles, unittests pass on Android (host tests) Change-Id: Id665b22286e16dd38cee4f98a2000f0e231daae6
2015-12-22Remove superfasthashChristopher Wiley
We can use std::hash instead on brillo Bug: 26253162 Test: brilloemulator_arm64 compiles Change-Id: I3d363a77c55e9ed0e53ef40aa0b4eba81813d211
2015-12-17Remove xdg_* libraries from base/third_partyChristopher Wiley
Bug: 26253162 Change-Id: I22a10863d856c60240ee8e5139bbb680bed2807e Test: Compiles
2015-12-17Remove third party floating point libraryChristopher Wiley
We can depend on standard primitives for these operations in chrome os. Note the formatting of DoubleToString() changes a little since the standard primitives are a little less pretty. The behavior of StringToDouble changed a little with respect to numbers not representable as a double (too large or small). StringToDouble still reports a broken conversion, but the value returned is infinity rather than the maximum finite value. Bug: 26253162 Change-Id: I5ba87d0787bb832d188f6460d952fd852e27fed6 Test: compiles, unittests pass on host
2015-12-03metrics: Show error on invalid histograms.Bertrand SIMONNET
When a service sends a histogram with invalid construction, print an error. Bug: 25670685 Change-Id: I405befe42d81746c0e31abcd0b1626f516d2d000 Test: Sends incorrect histogram. A message is logged.
2015-11-24Define DISALLOW_COPY_AND_ASSIGN only if is undefined.Bertrand SIMONNET
Other libraries define this macro already (libnativehelper for example). We already have a guard there to ensure we don't define the macros twice. We should have one in libchrome too. Bug: 25862968 Change-Id: I2e238eb06d58c3877745841ec1f7da79bf58a34e
2015-10-29Don't use __DATE__/__TIME__ on Androidbrillo-m7-releasebrillo-m7-mr-devbrillo-m7-devDan Willemsen
Instead, pull the build date of the system from the ro.build.date system property. Then this library will be identical as long as the sources and dependencies don't change, and we won't have to update it on every OTA. Bug: 24204119 Change-Id: Ie5368ec0bbbc635dc6b86f9259d6567fe26ca2ba
2015-09-30Don't crash when logging if CommandLine is uninitialized.Daniel Erat
The base::CommandLine singleton is usually initialized from main(), but some gtest-based unit tests don't have control over that function. Guard CommandLine accesses in base/logging.cc to handle this gracefully. Bug: 24536569 Change-Id: If3eab0f36c28bb6b3cf3569c61c7d7cec5cf7b10
2015-09-22Cherry-Pick: Don't assume that uid_t is intScott James Remnant
When libchrome is compiled in Brillo, using Android bionic, uid_t is actually defined as 'unsigned int'. This is Chromium r260569, and is the sole code fix required to allow building the Fluoride unit tests and test tools for a Mac host. BUG=22771504, chromium:534675 Change-Id: I16e5ab954d1fb8540c0b875ce6b31d48a787a612
2015-09-15Use program name as Android log tag.Daniel Erat
To make it easier to attribute log messages, use argv[0]'s basename (as supplied by base::CommandLine::GetProgram()) as the log tag. This only affects libchrome builds for Android (i.e. when __ANDROID__ is defined but OS_ANDROID isn't). Bug: 23168740 Change-Id: I5a95602877c393d1e05b3ae8a31a25c7b47d3ce1
2015-08-24Make base::WriteFile use mode 0666 instead of 0640.Daniel Erat
Temporarily revert base::WriteFile to the behavior in older revision of libchrome until we sort out the expected file permissions at all call sites of base::WriteFile in Chrome OS code (crbug.com/412057). This is benchan@chromium.org's base-334380-revert-writefile-permissions.patch from Chrome OS. The original commit was https://chromium-review.googlesource.com/216584. Bug: 22317122 Change-Id: Ia86ef66122b6cf148bad56d13ef82624e1db8a5b
2015-08-21Disabling SecurityTest.CallocOverflowAri Hausman-Cohen
CallocOverflow test has some difficult issues preventing it from passing. See b/23428680. Disabling it until these issues are addressed. BUG: 23428680, 22884411 Change-Id: Ie254ae63e9cb61ff4a575ee0369bff8e85dbe29c
2015-08-19Enable logging and use __ANDROID__ instead of __BRILLO__.Daniel Erat
Drop the __BRILLO__ #define, instead using the existing __ANDROID__ define set by the toolchain and setting a new __ANDROID_HOST__ define when building for the host. Also use Android logging when __ANDROID__ is defined. Bug: 23358460 Change-Id: I0d86eac8af381b002a3d46d8a95434c7e24518bd
2015-08-13Fixing unit tests to pass when run.Ari Hausman-Cohen
Submitted before chromium cl 1273243002 went through, CQ found issue that is fixed here. BUG: 22884411, 22947438 Change-Id: Ib91967ce6cdd60d4c923822b0fa52c40661070fe
2015-08-11Fixing unit tests to pass when run.Ari Hausman-Cohen
See discussion on bug. Summary: * When building for brillo not on host tmp dir now defaults to the android "/data/local/tmp" * Command line is temporary fix because current test runner doesn't Init. * Dir reader posix was using an outdated method of getting a temp dir. (checked with agl) * String conversions used incorrect capitalization of locales. * File path needed localization on host machine (checked with rvargas) BUG: 22884411, 22947438 Change-Id: Ib7ffa58a84c8d93c819ba572e2fbd04dd1719e55
2015-07-31Updated libchrome to build native unit testsAri Hausman-Cohen
libchromeTests added to Android.mk, along with many unit test files. Once built and synced, the tests can be run on the device/emulator via /data/nativetest/libchrome_test/libchrome_test Moved the gtest & gmock testing directory out of base/ since all the files were looking for it directly under libchrome/. Bug: 22857514 Change-Id: Ib65897b32979160768dd1e45092bb8f520833666 Signed-off-by: Ari Hausman-Cohen <arihc@google.com>
2015-07-27Merge "base64: Fix import path for modp_b64."Bertrand Simonnet
2015-07-24base64: Fix import path for modp_b64.Bertrand SIMONNET
modp_b64 was moved to a subdirectory. We need to change the import path too. Change-Id: I3b9e75895bf93dc6c128944264e205240ddf33ca