summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Move base::FreeDeleter into its own header.dcheng2016-03-269-15/+33
| | | | | | | | | | Final blocker to wholly deleting base/memory/scoped_ptr.h. BUG=554298 Review URL: https://codereview.chromium.org/1837483003 Cr-Commit-Position: refs/heads/master@{#383417}
* Add traces for main omnibox providersa-v-y2016-03-251-1/+1
| | | | | | | | | | | | | Add trace events for main omnibox providers. They are useful when analyzing problems with omnibox slow response and lagginess while typing, like issue 178705. Committed: https://crrev.com/46959e833a3bfedbd783f829094a0824e756ee65 Cr-Commit-Position: refs/heads/master@{#381913} Review URL: https://codereview.chromium.org/1805363002 Cr-Commit-Position: refs/heads/master@{#383360}
* Return VERSION_PRE_XP if OS version is pre-XP.wfh2016-03-251-2/+1
| | | | | | | | | | | This restores previous behavior before crrev.com/1784623003 BUG=597980 TEST=base_unittests on XP running in NT4 compat mode. Review URL: https://codereview.chromium.org/1832143002 Cr-Commit-Position: refs/heads/master@{#383332}
* Fix tautologous DCHECK in base::internal::JSONParser.rsesek2016-03-251-1/+1
| | | | | | | | | BUG=596278 R=mark@chromium.org Review URL: https://codereview.chromium.org/1834933003 Cr-Commit-Position: refs/heads/master@{#383316}
* Remove even more headers from base/memory/scoped_ptr.hdcheng2016-03-251-4/+0
| | | | | | | | BUG=554298 Review URL: https://codereview.chromium.org/1828923004 Cr-Commit-Position: refs/heads/master@{#383315}
* Added comment/warning to GetPageSize() method.pkl2016-03-251-1/+4
| | | | | | | | | | | Warns about difference between GetPageSize() and the kernel page size used by mincore() system call. BUG=542671 Review URL: https://codereview.chromium.org/1813343002 Cr-Commit-Position: refs/heads/master@{#383263}
* Reland: add dump provider for malloc heap profiler ↵primiano2016-03-257-33/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/1675183006/) Reason for reland: the previous CL forgot about the fact that nacl has its own special base target (base_nacl) which is a fork of the real base one. That caused a revert in crrev.com/1822013002 because: - The original CL introduced a dependency from a translation unit in base (malloc_dump_provider.cc) to allocator_features.h, which is a generated header. - The original CL was relying on the fact that there is an existing dependency from base to allocator_features declared in base.gyp. - The original CL forgot about the need of the same dependency from base_nacl. This cl is fixing the latter point. Original breakage: https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Mac/builds/8808 Original issue's description: > tracing: add dump provider for malloc heap profiler > > Now that the allocator shim is landing (the base API landed in > crre.com/1675143004, Linux support in crrev.com/1781573002) we > can use that to implement the malloc heap profiler on top of that. > This CL leverages the new shim API to collect information about > malloc/free and injecting that into the heap profiler, leveraging > the same infrastructure we are already using for PartitionAlloc > and BlinkGC (oilpan). > > Next steps > ---------- > Currently this heap profiler reports also the memory used by the > tracing subsystem itself, which is not desirable. Will come up > with some scoped suppression semantic to bypass the reporting. > > BUG=550886 > TBR=haraken > > Committed: https://crrev.com/14c8b52dac1285bbf23514d05e6109aa7edc427f > Cr-Commit-Position: refs/heads/master@{#382505} BUG=550886, 596873 TBR=ssid@chromium.org,petrcermak@chromium.org,dskiba@google.com,haraken@chromium.org Review URL: https://codereview.chromium.org/1831763003 Cr-Commit-Position: refs/heads/master@{#383225}
* Remove more headers from base/memory/scoped_ptr.hdcheng2016-03-252-3/+1
| | | | | | | | BUG=554298 Review URL: https://codereview.chromium.org/1830183004 Cr-Commit-Position: refs/heads/master@{#383199}
* mac: Only use Mach shared memory.erikchen2016-03-241-45/+1
| | | | | | | | | | The experiment comparing it to POSIX shared memory has finished. BUG=547261 Review URL: https://codereview.chromium.org/1826723002 Cr-Commit-Position: refs/heads/master@{#383086}
* Replace usages of DEPRECATED_java_in_dir with java_filesagrieve2016-03-232-4/+105
| | | | | | | | BUG=484854 Review URL: https://codereview.chromium.org/1829823002 Cr-Commit-Position: refs/heads/master@{#382905}
* base: Remove scoped_refptr unwrapping for Bind arguments.vmpstr2016-03-222-5/+10
| | | | | | | | | | | | | | | This patch removes scoped_refptr unwrapping for general Bind parameters. Note that the only parameter that is still unwrapped is the first one if it's an object on which the method is called. Please see the bug for more context. R=tzik@chromium.org, thakis@chromium.org, danakj@chromium.org BUG=589048 Review URL: https://codereview.chromium.org/1816713002 Cr-Commit-Position: refs/heads/master@{#382730}
* Update BookmarkBarController to use non-deprecated dragging APIs.erikchen2016-03-221-0/+4
| | | | | | | | | | | | | | | | | | | | This CL theoretically should not produce any behavior change. This CL replaces the method -[NSView dragImage:...] with -[NSView beginDraggingSessionWithItems:...]. There are three major differences. 1. The new API is asynchronous, whereas the old one ran a nested run loop. This CL runs a nested run loop to maintain the previous behavior. 2. The new API makes use of some new terminology and protocols (NSDraggingSession, NSDraggingSource, etc.) but the underlying logic is still the same. This CL renames some methods and variables. 3. The new API requires that custom PasteBoard types use reverse DNS notation. BUG=592663 Review URL: https://codereview.chromium.org/1815053002 Cr-Commit-Position: refs/heads/master@{#382722}
* Revert of Collect information about failing histogram factory calls. ↵bcwhite2016-03-225-151/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #10 id:360001 of https://codereview.chromium.org/1719363002/ ) Reason for revert: Information collected. Original issue's description: > Collect information about failing histogram factory calls. > > Some tests need to be disabled because they create the same histogram with different parameters, a condition which does not always crash in the calling code but does with this CL. > > This CL will be reverted once the necessary information has been collected, including re-enabling of any tests. > > SHERIFFS: If a test breaks in the waterfall, you can either revert this CL or disable the test. I'll re-enable it when reverting this after the necessary data has been collected. > > BUG=588946 > > Committed: https://crrev.com/ce1315b94863f40d6323fa488490ed866aae4ed4 > Cr-Commit-Position: refs/heads/master@{#378957} > > Committed: https://crrev.com/63f1c5d846f6dac2cf148b81961c38b88ff1bd86 > Cr-Commit-Position: refs/heads/master@{#379323} > > Committed: https://crrev.com/89dca78efa00acb8fc8749adcc1a08a24eb105d5 > Cr-Commit-Position: refs/heads/master@{#379489} > > Committed: https://crrev.com/1375777f66fcf8edd3f393dadd9d9de6a7409030 > Cr-Commit-Position: refs/heads/master@{#379690} > > Committed: https://crrev.com/0abc5c2d2cb7ac70e26eab73d7e3f61f0472461e > Cr-Commit-Position: refs/heads/master@{#380070} > > Committed: https://crrev.com/1d50ab3eec1dab7d3a6c70ec85b8937d5073b66d > Cr-Commit-Position: refs/heads/master@{#380474} > > Committed: https://crrev.com/29601c49ec14ecb8cdfac577288b814e4c425bfa > Cr-Commit-Position: refs/heads/master@{#380889} > > Committed: https://crrev.com/30226c80730aad905d7949289c840069befb40fb > Cr-Commit-Position: refs/heads/master@{#381774} TBR=asvitkine@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=588946 Review URL: https://codereview.chromium.org/1825143002 Cr-Commit-Position: refs/heads/master@{#382627}
* Plumb trial association without overriding a feature to subprocesses.asvitkine2016-03-223-7/+58
| | | | | | | | | | | | | | This makes features used in only in renders report their default group correctly as well. This is done by having the --enable-features flag also plumb the non-overriding associations over. This way, when a feature is queried in the renderer, the associated trial is activated there (and then synced to the browser). BUG=587135 Review URL: https://codereview.chromium.org/1824753002 Cr-Commit-Position: refs/heads/master@{#382575}
* Revert of tracing: add dump provider for malloc heap profiler (patchset #11 ↵gab2016-03-226-232/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:200001 of https://codereview.chromium.org/1675183006/ ) Reason for revert: Breaks Google Chrome Mac bot. Looks like it fails to find base/allocator/features.h for the pnacl build. FWICT features.h is a generated header that goes in out/Debug/gen/base/allocator/features.h and it isn't found in the NaCL build for some reason. Weird that it was not caught when this landed but rather much later. It probably depends on which part of the incremental build are triggered..? Missing dependency somewhere perhaps? Full error log: https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Mac/builds/8808 Snippet: (...) FAILED: cd ../../base; export BUILT_FRAMEWORKS_DIR=/b/build/slave/google-chrome-rel-mac/build/src/out/Release; export BUILT_PRODUCTS_DIR=/b/build/slave/google-chrome-rel-mac/build/src/out/Release; export CONFIGURATION=Release; export PRODUCT_NAME=base_nacl; export SDKROOT=/Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk; export SRCROOT=/b/build/slave/google-chrome-rel-mac/build/src/out/Release/../../base; export SOURCE_ROOT="${SRCROOT}"; export TARGET_BUILD_DIR=/b/build/slave/google-chrome-rel- (...) list=../out/gypfiles/base/pnacl_newlib.base_nacl.source_list.gypcmd" trace_event/malloc_dump_provider.cc:11:10: fatal error: 'base/allocator/features.h' file not found #include "base/allocator/features.h" ^ 1 error generated. FAILED with 1: /b/build/goma/gomacc ../native_client/toolchain/mac_x86/pnacl_newlib/bin/pnacl-clang++ -c trace_event/malloc_dump_provider.cc -o ../out/Release/obj/base/base_nacl.gen/pnacl_newlib-pnacl/base_nacl/malloc_dump_provider_eeff7b85.o -MD -MF ../out/Release/obj/base/base_nacl.gen/pnacl_newlib-pnacl/base_nacl/malloc_dump_provider_eeff7b85.d -O2 -g -Wall -fdiagnostics-show-option -Werror -fno-strict-aliasing -Wno-unused-function -Wno-char-subscripts -Wno-c++11-extensions -Wno-unnamed-type-template-args -Wno-extra-semi -Wno-unused-private-field -Wno-char-subscripts -Wno-unused-function -std=gnu++11 -D__STDC_LIMIT_MACROS=1 -D__STDC_FORMAT_MACROS=1 -D_GNU_SOURCE=1 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE=600 -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DDYNAMIC_ANNOTATIONS_PREFIX=NACL_ -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DGOOGLE_CHROME_BUILD -DCR_CLANG_REVISION=263324-1 -DENABLE_RLZ -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_PROD_WALLET_SERVICE=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_HANGOUT_SERVICES_EXTENSION=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DUSE_OPENSSL_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DBASE_IMPLEMENTATION -DSYSTEM_NATIVE_UTF8 -DNACL_WINDOWS=0 -DNACL_OSX=0 -DNACL_LINUX=0 -DNACL_ANDROID=0 -DNACL_BUILD_ARCH=pnacl -I../out/Release/gen/tc_pnacl_newlib/include -I.. -I../out/Release/gen -I.. -DNDEBUG -std=gnu++0x -Wno-deprecated-register Compile options: ['-O2', '-g', '-Wall', '-fdiagnostics-show-option', '-Werror', '-fno-strict-aliasing', '-Wno-unused-function', '-Wno-char-subscripts', '-Wno-c++11-extensions', '-Wno-unnamed-type-template-args', '-Wno-extra-semi', '-Wno-unused-private-field', '-Wno-char-subscripts', '-Wno-unused-function', '-std=gnu++11', '-D__STDC_LIMIT_MACROS=1', '-D__STDC_FORMAT_MACROS=1', '-D_GNU_SOURCE=1', '-D_POSIX_C_SOURCE=199506', '-D_XOPEN_SOURCE=600', '-DDYNAMIC_ANNOTATIONS_ENABLED=1', '-DDYNAMIC_ANNOTATIONS_PREFIX=NACL_', '-DV8_DEPRECATION_WARNINGS', '-DCLD_VERSION=2', '-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0', '-DGOOGLE_CHROME_BUILD', '-DCR_CLANG_REVISION=263324-1', '-DENABLE_RLZ', '-DUSE_LIBJPEG_TURBO=1', '-DENABLE_WEBRTC=1', '-DENABLE_MEDIA_ROUTER=1', '-DUSE_PROPRIETARY_CODECS', '-DENABLE_PEPPER_CDMS', '-DENABLE_CONFIGURATION_POLICY', '-DENABLE_NOTIFICATIONS', '-DENABLE_TOPCHROME_MD=1', '-DENABLE_TASK_MANAGER=1', '-DENABLE_EXTENSIONS=1', '-DENABLE_PDF=1', '-DENABLE_PLUGIN_INSTALLATION=1', '-DENABLE_PLUGINS=1', '-DENABLE_SESSION_SERVICE=1', '-DENABLE_THEMES=1', '-DENABLE_AUTOFILL_DIALOG=1', '-DENABLE_PROD_WALLET_SERVICE=1', '-DENABLE_PRINTING=1', '-DENABLE_BASIC_PRINTING=1', '-DENABLE_PRINT_PREVIEW=1', '-DENABLE_SPELLCHECK=1', '-DUSE_BROWSER_SPELLCHECKER=1', '-DENABLE_CAPTIVE_PORTAL_DETECTION=1', '-DENABLE_APP_LIST=1', '-DENABLE_SETTINGS_APP=1', '-DENABLE_SUPERVISED_USERS=1', '-DENABLE_SERVICE_DISCOVERY=1', '-DENABLE_HANGOUT_SERVICES_EXTENSION=1', '-DV8_USE_EXTERNAL_STARTUP_DATA', '-DFULL_SAFE_BROWSING', '-DSAFE_BROWSING_CSD', '-DSAFE_BROWSING_DB_LOCAL', '-DUSE_LIBPCI=1', '-DUSE_OPENSSL=1', '-DUSE_OPENSSL_CERTS=1', '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS', '-DBASE_IMPLEMENTATION', '-DSYSTEM_NATIVE_UTF8', '-DNACL_WINDOWS=0', '-DNACL_OSX=0', '-DNACL_LINUX=0', '-DNACL_ANDROID=0', '-DNACL_BUILD_ARCH=pnacl', '-I../out/Release/gen/tc_pnacl_newlib/include', '-I..', '-I../out/Release/gen', '-I..', '-DNDEBUG'] Linker options: ['-B../out/Release/gen/tc_pnacl_newlib/lib'] Traceback (most recent call last): File "../native_client/build/build_nexe.py", line 845, in CompileProcess output_queue.put((filename, build.Compile(filename))) File "../native_client/build/build_nexe.py", line 575, in Compile raise Error('FAILED with %d: %s' % (err, ' '.join(cmd_line))) Error: FAILED with 1: /b/build/goma/gomacc ../native_client/toolchain/mac_x86/pnacl_newlib/bin/pnacl-clang++ -c trace_event/malloc_dump_provider.cc -o ../out/Release/obj/base/base_nacl.gen/pnacl_newlib-pnacl/base_nacl/malloc_dump_provider_eeff7b85.o -MD -MF ../out/Release/obj/base/base_nacl.gen/pnacl_newlib-pnacl/base_nacl/malloc_dump_provider_eeff7b85.d -O2 -g -Wall -fdiagnostics-show-option -Werror -fno-strict-aliasing -Wno-unused-function -Wno-char-subscripts -Wno-c++11-extensions -Wno-unnamed-type-template-args -Wno-extra-semi -Wno-unused-private-field -Wno-char-subscripts -Wno-unused-function -std=gnu++11 -D__STDC_LIMIT_MACROS=1 -D__STDC_FORMAT_MACROS=1 -D_GNU_SOURCE=1 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE=600 -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DDYNAMIC_ANNOTATIONS_PREFIX=NACL_ -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DGOOGLE_CHROME_BUILD -DCR_CLANG_REVISION=263324-1 -DENABLE_RLZ -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_PROD_WALLET_SERVICE=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_HANGOUT_SERVICES_EXTENSION=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DUSE_OPENSSL_CERTS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DBASE_IMPLEMENTATION -DSYSTEM_NATIVE_UTF8 -DNACL_WINDOWS=0 -DNACL_OSX=0 -DNACL_LINUX=0 -DNACL_ANDROID=0 -DNACL_BUILD_ARCH=pnacl -I../out/Release/gen/tc_pnacl_newlib/include -I.. -I../out/Release/gen -I.. -DNDEBUG -std=gnu++0x -Wno-deprecated-register (...) Original issue's description: > tracing: add dump provider for malloc heap profiler > > Now that the allocator shim is landing (the base API landed in > crre.com/1675143004, Linux support in crrev.com/1781573002) we > can use that to implement the malloc heap profiler on top of that. > This CL leverages the new shim API to collect information about > malloc/free and injecting that into the heap profiler, leveraging > the same infrastructure we are already using for PartitionAlloc > and BlinkGC (oilpan). > > Next steps > ---------- > Currently this heap profiler reports also the memory used by the > tracing subsystem itself, which is not desirable. Will come up > with some scoped suppression semantic to bypass the reporting. > > BUG=550886 > TBR=haraken > > Committed: https://crrev.com/14c8b52dac1285bbf23514d05e6109aa7edc427f > Cr-Commit-Position: refs/heads/master@{#382505} TBR=ssid@chromium.org,petrcermak@chromium.org,dskiba@google.com,haraken@chromium.org,primiano@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=550886, 596873 Review URL: https://codereview.chromium.org/1822013002 Cr-Commit-Position: refs/heads/master@{#382566}
* tracing: add dump provider for malloc heap profilerprimiano2016-03-226-33/+232
| | | | | | | | | | | | | | | | | | | | | | | Now that the allocator shim is landing (the base API landed in crre.com/1675143004, Linux support in crrev.com/1781573002) we can use that to implement the malloc heap profiler on top of that. This CL leverages the new shim API to collect information about malloc/free and injecting that into the heap profiler, leveraging the same infrastructure we are already using for PartitionAlloc and BlinkGC (oilpan). Next steps ---------- Currently this heap profiler reports also the memory used by the tracing subsystem itself, which is not desirable. Will come up with some scoped suppression semantic to bypass the reporting. BUG=550886 TBR=haraken Review URL: https://codereview.chromium.org/1675183006 Cr-Commit-Position: refs/heads/master@{#382505}
* base: Add blame contextskyostil2016-03-218-40/+579
| | | | | | | | | | | | | | | | This patch introduces the concept of a blame context, which is a logical entity to which we can attribute various types of costs (e.g., CPU usage, network bandwidth, memory allocations, etc.). A follow-up patch will add a specific blame context for web frames. Design doc: https://docs.google.com/document/d/15BB-suCb9j-nFt55yCFJBJCGzLg2qUm3WaSOPb8APtI BUG=546021 Review URL: https://codereview.chromium.org/1776673002 Cr-Commit-Position: refs/heads/master@{#382401}
* Add RetainedRef uses where needed.vmpstr2016-03-217-32/+39
| | | | | | | | | | | | | | | This patch adds RetainedRef uses where they are required. These changes will be required when we remove automatic unwrapping of scoped_refptrs in Bind. Please see the bug for more context. R=tzik@chromium.org, thakis@chromium.org, danakj@chromium.org BUG=589048 Review URL: https://codereview.chromium.org/1815363002 Cr-Commit-Position: refs/heads/master@{#382371}
* Fix strict mode violation in TabPersistentStore.cleanupPersistentData()agrieve2016-03-212-28/+11
| | | | | | | | | | Moved File.list() calls to AsyncTask. BUG=586233 Review URL: https://codereview.chromium.org/1708763003 Cr-Commit-Position: refs/heads/master@{#382338}
* Update a broken link.avi2016-03-211-1/+1
| | | | | | | | BUG=none Review URL: https://codereview.chromium.org/1817133002 Cr-Commit-Position: refs/heads/master@{#382310}
* [iOS] Mark test bundle_data targets as testonly.sdefresne2016-03-191-0/+1
| | | | | | | | | | | Mark bundle_data targets used only for tests targets as testonly to prevent linking them in production applications. BUG=297668 Review URL: https://codereview.chromium.org/1807213002 Cr-Commit-Position: refs/heads/master@{#382199}
* Fix sense of CheckOpResult comment.wez2016-03-191-1/+1
| | | | | | | | | Committed: https://crrev.com/b7662fc32246dda98df64fd8aa41fddbaae7d2be Cr-Commit-Position: refs/heads/master@{#382056} Review URL: https://codereview.chromium.org/1808053002 Cr-Commit-Position: refs/heads/master@{#382167}
* Add sharing flag to file open during unsafe image test.forshaw2016-03-181-2/+2
| | | | | | | | | | | | This fixes an issue with the unsafe image test when it's run concurrently. Without the sharing flag the open can sometimes fails depending on timing which makes the test flaky. BUG=594462 Review URL: https://codereview.chromium.org/1791383003 Cr-Commit-Position: refs/heads/master@{#382128}
* TaskScheduler [4/9] Priority Queuefdoray2016-03-188-7/+501
| | | | | | | | | | | | | | | | | | This change is a subset of https://codereview.chromium.org/1698183005/ A PriorityQueue holds Sequences of Tasks. It supports Push, Pop and Peek operations through a Transaction object. A SequenceSortKey must be provided to push a Sequence into a PriorityQueue. Sequences are sorted according to their SequenceSortKey. The SequenceSortKey of a Sequence never changes while it is in the PriorityQueue (even if Tasks are pushed/popped from the Sequence). BUG=553459 Review URL: https://codereview.chromium.org/1709713002 Cr-Commit-Position: refs/heads/master@{#382115}
* Adjust some comments in crash_logging.h.eroman2016-03-181-3/+3
| | | | | | Review URL: https://codereview.chromium.org/1818583002 Cr-Commit-Position: refs/heads/master@{#382105}
* base: Add RetainedRef for unwrapping scoped_refptrs.vmpstr2016-03-181-0/+41
| | | | | | | | | | | | | | | | | | | | | This patch adds a RetainedRef call in order to be used in Bind with scoped_refptrs that are to be unwrapped before calling the function. This is an effort to eliminate implicit scoped_refptr construction from Bind. Currently, scoped_refptr are always unwrapped into their underlying T*. This means that if the function does actually expect a scoped_refptr, one will be constructed implicitly. The plan is to stop unwrapping scoped_refptrs altogether. If the behavior is still desired, then the object has to be wrapped in a RetainedRef wrapper. For more details, please see crbug.com/589048 R=tzik@chromium.org, danakj@chromium.org, thakis@chromium.org BUG=589048 Review URL: https://codereview.chromium.org/1815493002 Cr-Commit-Position: refs/heads/master@{#382076}
* Fix sense of CheckOpResult comment.wez2016-03-181-1/+1
| | | | | | Review URL: https://codereview.chromium.org/1808053002 Cr-Commit-Position: refs/heads/master@{#382056}
* base: Remove some unnecessary const scoped_refptr<>&.vmpstr2016-03-1818-139/+108
| | | | | | | | | | | | | This patch removes some unnecessary const scoped_refptr<>&. It replaces some instances with a copy of scoped_refptr, followed by a move. Other instances, it passes a raw non-owning pointer. R=danakj BUG=589044 Review URL: https://codereview.chromium.org/1800743003 Cr-Commit-Position: refs/heads/master@{#382043}
* Changes TestLauncher to support additional features:sky2016-03-183-40/+89
| | | | | | | | | | | | | | | | . Ability to inherit handles. . A callback that is called once the test process is launched. I'm going to need this running browser tests in mash. See https://codereview.chromium.org/1806353003/ for everything. BUG=581733 TEST=test only changes R=jam@chromium.org Review URL: https://codereview.chromium.org/1811303003 Cr-Commit-Position: refs/heads/master@{#382020}
* Reland - Update DevTools Tracing.Start to accept trace config as a parameterzhenw2016-03-183-20/+102
| | | | | | | | | | | | | | | | | | | | | | | Original CL: https://crrev.com/1765153002 Forgot to decouple some statement from DCHECK, which was actually pointed out by Primiano before. Should be fixed now. -------------------- original description -------------------- This CL updates Tracing.Start to accept trace config as a parameter when starting tracing. It is backward compatible with the old way. Design doc: https://goo.gl/GxQ23k BUG=579358 TBR=primiano@chromium.org,caseq@chromium.org,simonhatch@chromium.org,petrcermak@chromium.org,pfeldman@chromium.org Review URL: https://codereview.chromium.org/1808353002 Cr-Commit-Position: refs/heads/master@{#381892}
* Revert of Update DevTools Tracing.Start to accept trace config as a ↵fgorski2016-03-173-101/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parameter (patchset #10 id:180001 of https://codereview.chromium.org/1765153002/ ) Reason for revert: TraceConfigTest.TraceConfigFromDict fialed https://build.chromium.org/p/chromium.linux/builders/Cast%20Linux/builds/21289/steps/base_unittests/logs/stdio https://build.chromium.org/p/chromium.linux/builders/Cast%20Linux/builds/21289 Original issue's description: > Update DevTools Tracing.Start to accept trace config as > a parameter > > This CL updates Tracing.Start to accept trace config as > a parameter when starting tracing. It is backward compatible > with the old way. > > Design doc: https://goo.gl/GxQ23k > BUG=579358 > > Committed: https://crrev.com/c0e3792f832fc454324dbe35d01079b124b072cd > Cr-Commit-Position: refs/heads/master@{#381783} TBR=caseq@chromium.org,primiano@chromium.org,nednguyen@google.com,petrcermak@chromium.org,simonhatch@chromium.org,pfeldman@chromium.org,zhenw@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=579358 Review URL: https://codereview.chromium.org/1814043002 Cr-Commit-Position: refs/heads/master@{#381794}
* Trim some headers from base/memory/scoped_ptr.hdcheng2016-03-171-3/+0
| | | | | | | | | | BUG=554298 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/1810893003 Cr-Commit-Position: refs/heads/master@{#381793}
* Update DevTools Tracing.Start to accept trace config aszhenw2016-03-173-20/+101
| | | | | | | | | | | | | | | a parameter This CL updates Tracing.Start to accept trace config as a parameter when starting tracing. It is backward compatible with the old way. Design doc: https://goo.gl/GxQ23k BUG=579358 Review URL: https://codereview.chromium.org/1765153002 Cr-Commit-Position: refs/heads/master@{#381783}
* Collect information about failing histogram factory calls.bcwhite2016-03-175-17/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests need to be disabled because they create the same histogram with different parameters, a condition which does not always crash in the calling code but does with this CL. This CL will be reverted once the necessary information has been collected, including re-enabling of any tests. SHERIFFS: If a test breaks in the waterfall, you can either revert this CL or disable the test. I'll re-enable it when reverting this after the necessary data has been collected. BUG=588946 Committed: https://crrev.com/ce1315b94863f40d6323fa488490ed866aae4ed4 Cr-Commit-Position: refs/heads/master@{#378957} Committed: https://crrev.com/63f1c5d846f6dac2cf148b81961c38b88ff1bd86 Cr-Commit-Position: refs/heads/master@{#379323} Committed: https://crrev.com/89dca78efa00acb8fc8749adcc1a08a24eb105d5 Cr-Commit-Position: refs/heads/master@{#379489} Committed: https://crrev.com/1375777f66fcf8edd3f393dadd9d9de6a7409030 Cr-Commit-Position: refs/heads/master@{#379690} Committed: https://crrev.com/0abc5c2d2cb7ac70e26eab73d7e3f61f0472461e Cr-Commit-Position: refs/heads/master@{#380070} Committed: https://crrev.com/1d50ab3eec1dab7d3a6c70ec85b8937d5073b66d Cr-Commit-Position: refs/heads/master@{#380474} Committed: https://crrev.com/29601c49ec14ecb8cdfac577288b814e4c425bfa Cr-Commit-Position: refs/heads/master@{#380889} Review URL: https://codereview.chromium.org/1719363002 Cr-Commit-Position: refs/heads/master@{#381774}
* Allow trials to associate without overriding a feature.asvitkine2016-03-173-1/+37
| | | | | | | | | | | | | | | | This adds a heuristic such that if a study only references a single feature from any of its groups, its other groups will be associated with that feature as well, for reporting only. This allows a config like 25% Enabled, 25% Disabled and 50% Default to still report the users in the default group to UMA, so that they show up in the data. More details in the code comments. BUG=587135 Review URL: https://codereview.chromium.org/1809633003 Cr-Commit-Position: refs/heads/master@{#381737}
* Remove unnecessary inclusion of sys/syscall.h in base/logging.ccbenchan2016-03-171-2/+0
| | | | | | | | | | | | | | The inclusion of sys/syscall.h was introduced in crrev.com/4916 to obtain the current thread ID via `syscall(__NR_gettid)`. The code was later changed in crrev.com/118152 to use `base::PlatformThread::CurrentId()` instead. The inclusion of sys/syscall.h is no longer needed and thus removed by this CL. BUG=None Review URL: https://codereview.chromium.org/1812733002 Cr-Commit-Position: refs/heads/master@{#381735}
* Add support for persistent sparse histograms.bcwhite2016-03-1714-142/+964
| | | | | | | | | | | | | | Sparse histograms don't have a single "values vector" that can be created during construction. Rather, they create a list of value "records" that can be easily added to as needed. BUG=546019 TBR=mark mark: gn and gyp (new files) Review URL: https://codereview.chromium.org/1734033003 Cr-Commit-Position: refs/heads/master@{#381699}
* TaskScheduler [3/9] Task and Sequencefdoray2016-03-1713-18/+638
| | | | | | | | | | | | | | | | | | This change is a subset of https://codereview.chromium.org/1698183005/ A Task is a unit of work in the task scheduler. It has a closure, a sequenced time, TaskTraits and other metadata inherited from base::PendingTask. A Sequence holds Tasks that must run in order. It is ref-counted and has thread-safe Push, Pop and Peek operations. Priority queues, worker threads and task runners will have references on Sequences. BUG=553459 Review URL: https://codereview.chromium.org/1705253002 Cr-Commit-Position: refs/heads/master@{#381638}
* Call CheckTrialGroup only under lock.asvitkine2016-03-161-2/+5
| | | | | | | | | | | | | | | Since this code can be called from multiple threads, we should hold a lock when calling CheckTrialGroup since it modifies a std::map. The other call site was already holding the lock. BUG=595264 Review URL: https://codereview.chromium.org/1810593002 Cr-Commit-Position: refs/heads/master@{#381535}
* base: Make RefCountedBytes::TakeVector return ref ptr instead of raw ptrvmpstr2016-03-162-3/+4
| | | | | | | | | | | | | | This patch changes RefCountedBytes::TakeVector to return a ref ptr instead of a raw pointer. This minimizes the changes of a leak if a caller forgets to delete it, or forgets to wrap it in a ref ptr. R=danakj@chromium.org, thakis@chromium.org TBR=thakis@chromium.org BUG=595163 Review URL: https://codereview.chromium.org/1803263002 Cr-Commit-Position: refs/heads/master@{#381512}
* Report histogram creation results.bcwhite2016-03-168-18/+235
| | | | | | | | | | | | | | Add a new histogram that reports information about all the histograms created in different procesesses, their types, and what flags were set. BUG=546019 TBR=grt grt: single instantiating call in installer_metrics.cc Review URL: https://codereview.chromium.org/1726873002 Cr-Commit-Position: refs/heads/master@{#381482}
* Use sysctlbyname() to get kernel page size.pkl2016-03-163-6/+32
| | | | | | | | | | | | | | | | | | | | | This allows enabling of COUNT_RESIDENT_BYTES_SUPPORTED tests. It is also possible to change iOS' implementation of base::GetPageSize() implementation to use sysctlbyname() instead of getpagesize(), but since it is only the use of mincore() that requires the use of kernel page size, it is better to have a smaller change than a more invasive change to base::GetPageSize(). I'm concerned that changing GetPageSize() to return 4KB (what sysctlbyname returns) instead of 16KB (what getpagesize returns) may have some unknown side effects. BUG=542671 Review URL: https://codereview.chromium.org/1793943002 Cr-Commit-Position: refs/heads/master@{#381475}
* Use bundle_data and create_bundle to add support for iOS app bundle.sdefresne2016-03-161-0/+14
| | | | | | | | | | | | | | | | | | Add a new script //build/config/ios/ios_gen_plist.py to generate the Info.plist by merging multiple source files, performing substitutions of variables and converting to binary1 format. Expand //build/config/ios/ios_sdk.gni to output variables required for the substitution of variables in Info.plist. Refactor ios_app template to use bundle_data and create_bundle to create the application bundle. BUG=297668 Review URL: https://codereview.chromium.org/1752873002 Cr-Commit-Position: refs/heads/master@{#381429}
* Use std::is_base_of to assert WeakPtr is used correctlytzik2016-03-162-5/+4
| | | | | | | | | | | | | | | | SupportsWeakPtr::StaticAsWeakPtr used to use std::is_convertible to ensure the argument is derived fromSupportsWeakPtrBase. However, the assertion fails also when the class has multiple SupportWeakPtrBases as its ancestor, and in this case the error message from static_assert is inaccurate. Also, it doesn't match to base_nocompile_tests expectation. This CL replaces the std::is_convertible with std::is_base_of and updates base_nocompile_tests expectation. Review URL: https://codereview.chromium.org/1805503002 Cr-Commit-Position: refs/heads/master@{#381415}
* Refactor histogram_persistence to be a class.bcwhite2016-03-1612-462/+672
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The number of top-level functions was getting too large and impeding development of other features due to the previous lack of OO design. The code is largely unchanged, just moved into a stateful class and reordered to match the public/private sections of the class. Two other CLs are included here because they fit well with the refactoring: https://codereview.chromium.org/1689833002/ Add ownership-transfer to histogram management calls. This CL changes the interface to use scoped_ptr to explicitly document, with std::move, when the transfer of ownership is taking place. https://codereview.chromium.org/1731453002/ Reduce histogram creation time by avoiding import of those just created. Attempting to import histograms in the persistent memory segment is necessary because it could be shared and thus have other processes creating objects within it. However, there's no need to import those objects that this process created. The simple method remembering the "reference" of the last histogram created in the allocator catches almost all cases and reduces histogram creation time by 40%. BUG=546019 TBR=grt,thakis grt: setup/installer_metrics.cc (no logic changes) thakis: gn & gyp changes for new files Review URL: https://codereview.chromium.org/1738063002 Cr-Commit-Position: refs/heads/master@{#381386}
* Replace blink::WebDiscardableMemory with base::DiscardableMemory.jbroman2016-03-161-5/+24
| | | | | | | | | | | | | | | | | | * Inline WebDiscardableMemoryImpl into its only user, PurgeableVector, which is allowed to see base by virtue of being in platform. * Augment base::TestDiscardableMemoryAllocator's implementation with the same checks as Blink's. * Observing that the actual implementation never returns nullptr, remove logic that handles that (as other clients of base::DiscardableMemoryAllocator don't). * Supply a base::TestDiscardableMemoryAllocator in blink_platform_unittests. * Modify PurgeableVectorTest to vary only whether PurgeableVector requests discardable memory (PurgeableOption), since Blink's real platform (Chromium) does support it. Change all tests which don't vary in this way to be not parameterized. Review URL: https://codereview.chromium.org/1787973002 Cr-Commit-Position: refs/heads/master@{#381378}
* Remove overloads for comparing std::unique_ptr to std::nullpt_t.dcheng2016-03-151-40/+0
| | | | | | | | | | | | | | | | | | | | | These operators are completely unused: the only time they were ever called was inside various scoped_ptr unit tests. ‣ They aren't used for a std::set/std::map that stores std::unique_ptr, since STL containers don't support heterogeneous lookup. Insertion or lookup of a nullptr is implicitly converted to std::unique_ptr first. ‣ Code such as if (nullptr < my_ptr) should just be written if (my_ptr) ‣ Templated code could depend on these operators, but there are no instances today. If there's ever a need for these operators, it's simple enough to add them back. BUG=554298 Review URL: https://codereview.chromium.org/1797143002 Cr-Commit-Position: refs/heads/master@{#381321}
* metrics: Connect leak detector to base::allocatorsque2016-03-152-0/+42
| | | | | | | | | | | | | | | | | | | | | | This patch introduces the leak detector's integration layer, which gathers alloc/free info and passes it to the leak detection logic in LeakDetectorImpl. It registers callbacks with the allocator, which are called during alloc and free. These callbacks intercept and sample the alloc and free info. It also provides a notification interface for external objects to receive leak reports. See leak_detector.cc for more info. BUG=chromium:382705 TEST=build successfully, run components_unittests Review URL: https://codereview.chromium.org/1665553002 Cr-Commit-Position: refs/heads/master@{#381293}
* Make the allocator_features gyp target target-onlyprimiano2016-03-152-2/+3
| | | | | | | | | | | | | | | | | | | | | | | allocator_features uses buildflag_header to generate a header at build time. In host/target builds, both the #host and #target targets have a ninja rule for the same path, which is bad. This CL makes allocator_features follow the same pattern of base_debugging_flags (target-only, everything else explicitly refers to the #target veriant) I verified that the problem reproduces without this patch by doing: $ build/gyp_chromium -DOS=android -Duse_experimental_allocator_shim=1 $ ninja -w dupbuild=err -n -C out_android/Release/ all ninja: warning: multiple rules generate gen/base/allocator/features.h. builds involving this target will not be correct; And this CL fixes it. BUG=593695 Review URL: https://codereview.chromium.org/1794943006 Cr-Commit-Position: refs/heads/master@{#381289}
* Capture more details about failure to load ICU data filescottmg2016-03-151-0/+17
| | | | | | | | | | | | | | | The last round of debug stuff showed that InitializeICUWithFileDescriptorInternal() is being called with an invalid handle. This means that the File() ctor is failing. It's almost definitely going to be something like access denied caused by AV, etc., but confirm that hypothesis by saving off the error on the file open. R=jshin@chromium.org BUG=445616 Review URL: https://codereview.chromium.org/1802713002 Cr-Commit-Position: refs/heads/master@{#381261}