summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* base::Bind: Convert FileUtilProxy::ReadDirectoryCallback.jhawkins@chromium.org2011-10-172-11/+12
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8322009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105903 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert FileUtilProxy::GetFileInfoCallback.jhawkins@chromium.org2011-10-172-17/+15
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8315012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105888 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert FileUtilProxy::EnsureFileExistsCallback.jhawkins@chromium.org2011-10-172-9/+8
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8311012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105883 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert FileUtilProxy::CreateTemporaryCallback.jhawkins@chromium.org2011-10-172-11/+10
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8315011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105881 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Convert FileUtilProxy::CreateOrOpenCallback.jhawkins@chromium.org2011-10-172-11/+11
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8311010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105860 0039d316-1c4b-4281-b951-d872f2087c98
* Establish correct names for about:tracking profilerjar@chromium.org2011-10-171-0/+4
| | | | | | | | | | | | This file was mistakenly ommited from the recent landing, so the thread names were not being set (all threads other than the main thread wer assigned sequential "WorkerThread-N" names). r=eroman Review URL: http://codereview.chromium.org/8315010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105814 0039d316-1c4b-4281-b951-d872f2087c98
* Support MTA as well in the scoped COM initializer.tommi@chromium.org2011-10-171-1/+16
| | | | | | | BUG=none Review URL: http://codereview.chromium.org/8275030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105811 0039d316-1c4b-4281-b951-d872f2087c98
* Remove an unused typedef in scoped_nsobject.hisherman@chromium.org2011-10-171-4/+0
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/8283019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105764 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Cleanup in automation.jhawkins@chromium.org2011-10-172-9/+19
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8212006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105761 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Increase the arity to 7.jhawkins@chromium.org2011-10-164-16/+678
| | | | | | | | | | | | | | | | | This is required by a CL I have in the works. Stats from builds of Release Chrome target with -j12: Build time: -0.2%, within the noise. Size: No change in size of chrome binary. BUG=98542 TEST=none R=ajwong@chromium.org,akalin@chromium.org,willchan@chromium.org Review URL: http://codereview.chromium.org/8306008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105754 0039d316-1c4b-4281-b951-d872f2087c98
* base: Constantify the struct used in WprintfFormatPortabilityTest test case.tfarina@chromium.org2011-10-163-7/+6
| | | | | | | | | TEST=base_unittests --gtest_filter=StringUtilTest* R=willchan@chromium.org Review URL: http://codereview.chromium.org/8308007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105730 0039d316-1c4b-4281-b951-d872f2087c98
* Fix of unused variable warnings related to DHISTOGRAM* in release builds.pph34r@gmail.com2011-10-162-8/+50
| | | | | | | | | | | | | | Make DHISTOGRAM* keep a mention of passed variables. Add Histogram::DebugNow() for use in DHISTOGRAM* as a start_time. BUG=87490 TEST=None Review URL: http://codereview.chromium.org/8225001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105722 0039d316-1c4b-4281-b951-d872f2087c98
* base: Put lowercase_cases array inside TEST unit function.tfarina@chromium.org2011-10-161-10/+10
| | | | | | | | | TEST=base_unittests --gtest_filter=StringUtilTest.* R=willchan@chromium.org Review URL: http://codereview.chromium.org/8314006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105711 0039d316-1c4b-4281-b951-d872f2087c98
* Update task tracking to not depend on message_loop_ singletonjar@chromium.org2011-10-157-393/+349
| | | | | | | | | | | | | | | | | | | | | I also did a bunch of cleanup, and transitioned to tracking the duration of a run, rather than the time from posting (construction of a task) to completion of the run. It is less interesting for now to track queueing delay, and we need a focus on task execution time. I left in the hook (API) with the expectation that I'll be extending the tracked_objects code to include this as well. I also landed changes to run in Linux/Mac. The fact that I've punted on shutdown made this landing easy (all code support was previously lost during migration to some flavor of bind support). r=willchan,jam,viettrungluu,ajwong BUG=62728 Review URL: http://codereview.chromium.org/8233037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105694 0039d316-1c4b-4281-b951-d872f2087c98
* Add in an Owned() wrapper to base::Bind().ajwong@chromium.org2011-10-152-18/+116
| | | | | | | | | | | This allows expression of ownership of a pointer by a callback. It's basically a "scoped_ptr<>" for Callback where the scope tied to the callback object. BUG=96118 TEST=new unittests. Review URL: http://codereview.chromium.org/8209001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105622 0039d316-1c4b-4281-b951-d872f2087c98
* base/json: Use IsAsciiDigit in JSONReader::ReadInt() function.tfarina@chromium.org2011-10-141-2/+2
| | | | | | | | | | TEST=base_unittests --gtest_filter=JSON* R=tony@chromium.org Review URL: http://codereview.chromium.org/8276004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105586 0039d316-1c4b-4281-b951-d872f2087c98
* Fix line endings in base/file_util.h.grt@chromium.org2011-10-141-633/+633
| | | | | | | | | | BUG=none TEST=none TBR=skerner@chromium.org Review URL: http://codereview.chromium.org/8302010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105569 0039d316-1c4b-4281-b951-d872f2087c98
* Add WorkerPool::PostTaskAndReply and use in DHCP code.joi@chromium.org2011-10-147-55/+256
| | | | | | | | | | | | | This factors out the PostTaskAndReply implementation out of MessageLoopProxy so that it can be used for any destination thread accessible via a PostTask-like interface, and uses that code from both MessageLoopProxy and WorkerPool. The DhcpProxyScriptFetcherWin and DhcpProxyScriptAdapterFetcher classes were both using a PostTaskAndReply-like mechanism with a WorkerPool thread, and on inspection it looks like there are several places in net/ where this is done, and this motivated the larger change (vs. patch set 1 which was a mechanical switch to base::Bind from NewRunnableMethod). BUG=97516 TEST=net_unittests Review URL: http://codereview.chromium.org/8139028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105512 0039d316-1c4b-4281-b951-d872f2087c98
* Don't use `sizeof(a) / sizeof(a)` to compute the number of elements in array a.thakis@chromium.org2011-10-141-2/+4
| | | | | | | | | | | | | | The interesting parts of the patch are by wtc. Found by PVS Studio: http://www.viva64.com/en/b/0113/ , N12 BUG=100278 TEST=none Review URL: http://codereview.chromium.org/8273009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105467 0039d316-1c4b-4281-b951-d872f2087c98
* Expand the inline documentation for the HISTOGRAM_ENUMERATION macros.isherman@chromium.org2011-10-141-1/+7
| | | | | | | | | | | | This should help to reduce confusion about the recommended upper- and lower-bounds for enumerated histograms. BUG=none TEST=none Review URL: http://codereview.chromium.org/8273022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105440 0039d316-1c4b-4281-b951-d872f2087c98
* Change i18n icu header inclusions to not use system header syntax. asvitkine@chromium.org2011-10-143-4/+4
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/8274003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105437 0039d316-1c4b-4281-b951-d872f2087c98
* Support dynamic switching between integrated and discrete GPUs on Mac OS X.kbr@chromium.org2011-10-131-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change Chrome to allocate most OpenGL contexts with the kCGLPFAAllowOfflineRenderers flag, and specify NSSupportsAutomaticGraphicsSwitching in the Info.plist for the main executable and helper apps. This keeps Chrome on the integrated GPU except when using WebGL, accelerated 2D Canvas, Pepper 3D, and Core Animation-based plugins (except Flash). Chrome shares resources between OpenGL contexts in order to display WebGL and other content in the compositor, and resource sharing doesn't work between contexts allocated on different GPUs. Therefore, when the first context for a given renderer requests the discrete GPU, the channel is dropped and all contexts are reallocated on the discrete GPU. Similarly, when the last context requesting the discrete GPU for a given renderer is shut down, all contexts are dropped and reallocated on the integrated GPU. Currently dynamic GPU switching is only supported on the latest Mac OS X 10.7 update and MacBook Pros with dual AMD / Intel GPUs, though this will improve in future OS updates. Tested with WebGL, CSS 3D, Flash and Unity3D content and observed desired GPU switching behavior. Also added a layout test to WebKit under https://bugs.webkit.org/show_bug.cgi?id=69776 which when run in Chrome catches an assertion failure related to the destruction of contexts. The intent is to add it as a UI layout test on the GPU bots. BUG=88788 TEST=none Review URL: http://codereview.chromium.org/8233027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105399 0039d316-1c4b-4281-b951-d872f2087c98
* Add maruel and thakis to base/OWNERS.maruel@chromium.org2011-10-131-1/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105346 0039d316-1c4b-4281-b951-d872f2087c98
* Enable TCMalloc doubly-linked freelist in release buildsBUG=NoneTEST=Nonejschuh@chromium.org2011-10-131-4/+0
| | | | | | Review URL: http://codereview.chromium.org/8242017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105312 0039d316-1c4b-4281-b951-d872f2087c98
* Speed up observers list notifcation macro when list is emptyjar@chromium.org2011-10-131-6/+12
| | | | | | | | | | | | | | | | | | When an observer list is empty (as is the case in the heart of the message loop code, surronding Run()).... This reduces somthing in the range of 100+ (perhaps 1000+) out-of-line assembly instructions (including over a dozen slow atomic operations, a malloc, and a free), down to 4 inline assembly instructions. r=darin BUG=100121 Review URL: http://codereview.chromium.org/8262002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105302 0039d316-1c4b-4281-b951-d872f2087c98
* OpenBSD and FreeBSD fixes for base.mark@chromium.org2011-10-139-13/+367
| | | | | | | | | | | | | OpenBSD and FreeBSD need -I/usr/local/include for <execinfo.h>. Use !#/usr/bin/env bash because on !linux it's not located there. Patch by Robert Nagy <robert@openbsd.org> BUG=none TEST=none Review URL: http://codereview.chromium.org/8228005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105257 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Cleanup in base/observer_list*.jhawkins@chromium.org2011-10-122-11/+13
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8229035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105148 0039d316-1c4b-4281-b951-d872f2087c98
* Profiling for the renderer process.scottbyer@chromium.org2011-10-122-1/+11
| | | | | | | | | | | | | | | This lets you use --profiling-at-start=renderer and get profiler output for each renderer process started on Linux. The profiling classes are initialized at static initialization time, and the main thread is registered and the profile timer is started at that time. However, static initialization is done in the zygote, and the timer doesn't propagate across the fork, so trying to use the CPU profiler on the renderer never sampled. This patch re-registers the (new) main thread after the fork, which causes the profiler to check the state of the timer, and ends up re-starting it. A separate timer for flushing the profile and termination signal handler are added before the renderer process enters the sandbox in order to make sure the samples are written to disk. BUG=none TEST=Use it, get lovely traces, pperf away. Review URL: http://codereview.chromium.org/8083025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105134 0039d316-1c4b-4281-b951-d872f2087c98
* Add a sanity test that crashes under ASan. This should be used to check that ↵glider@chromium.org2011-10-121-0/+8
| | | | | | | | the tests are built correctly. Review URL: http://codereview.chromium.org/8240010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105108 0039d316-1c4b-4281-b951-d872f2087c98
* Add StackTrace::ToString().satorux@chromium.org2011-10-123-1/+15
| | | | | | | | | | | | | | | | | | | | This can be used for debug logging like: LOG(ERROR) << base::debug::StackTrace().ToString(); As opposed to std::strstream stream; base::debug::StackTrace().OutputToStream(&stream); LOG(ERROR) << stream.str(); BUG=none TEST=add a test to stack_unitttest and confirm it passes Review URL: http://codereview.chromium.org/8206015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105085 0039d316-1c4b-4281-b951-d872f2087c98
* Modify WaitableEvent::Wait() to return voidsteveblock@chromium.org2011-10-126-28/+24
| | | | | | | | | | | | | | | Currently, WaitableEvent::Wait() returns bool. However, the Windows implementation DCHECKs that the return value is true and the POSIX implementation can never return false. Also, all call sites that use the return value simply DCHECK that it's true. This change modifies the method to return void, adds a DCHECK in the POSIX implementation and updates call sites. Review URL: http://codereview.chromium.org/8221021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104990 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obsolete DisableGtkMessagePumposhima@chromium.org2011-10-122-48/+19
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/8216036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104962 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing set-true so that AddTraceEvent doesn't always search for thread namejbates@chromium.org2011-10-111-0/+1
| | | | | | Review URL: http://codereview.chromium.org/8102012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104950 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Clang-built ProcessUtilTest.GetTerminationStatusCrash.hans@chromium.org2011-10-111-1/+1
| | | | | | | | | | | | | | Writing to a NULL pointer is undefined behaviour, and unless that pointer is volatile, Clang will optimize it away, replacing it with an UD2 instruction which causes the process to die by SIGILL. This patch makes the pointer volatile, so the write occurrs, and the process dies with SIGSEGV as intended. BUG=68707 TEST=build with Clang, out/Release/base_unittests --gtest_filter=ProcessUtilTest.GetTerminationStatusCrash Review URL: http://codereview.chromium.org/8233010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104930 0039d316-1c4b-4281-b951-d872f2087c98
* Remove no longer needed android hack from logging.torne@chromium.org2011-10-111-5/+0
| | | | | | | | | | This hack is not needed any more; NOTREACHEDs should be handled the same as explicit DCHECKs. Review URL: http://codereview.chromium.org/8233006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104913 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove a static initializer in pickle.cc.thestig@chromium.org2011-10-101-4/+2
| | | | | | | | | BUG=94925 TEST=none Review URL: http://codereview.chromium.org/8207011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104802 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate task.hwillchan@chromium.org2011-10-101-0/+25
| | | | | | | | | | BUG=35223 TEST=none Review URL: http://codereview.chromium.org/8223010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104799 0039d316-1c4b-4281-b951-d872f2087c98
* FileStream unit tests now check for file close.ahendrickson@chromium.org2011-10-101-1/+1
| | | | | | | | | | | | | willchan: base/platform_file_win.cc has a comment correction. others: net/base/file_stream_unittest.cc BUG=None TEST=None Review URL: http://codereview.chromium.org/8112006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104691 0039d316-1c4b-4281-b951-d872f2087c98
* Add jar to base OWNERSjar@chromium.org2011-10-071-0/+1
| | | | | | | | | I do work relating to message_loop, timers, task tracking, etc. r=brettw Review URL: http://codereview.chromium.org/8206009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104556 0039d316-1c4b-4281-b951-d872f2087c98
* Reuse base::i18n::SetICUDefaultLocale from rtl.h in some unittests.tfarina@chromium.org2011-10-072-107/+87
| | | | | | | | | | | This removes duplicated versions of SetICUDefaultLocale() defined in unittests. TEST=base_unittests,ui_unittests R=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/8139034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104550 0039d316-1c4b-4281-b951-d872f2087c98
* Move json_value_serializer from content/common to base.dpranke@chromium.org2011-10-073-0/+239
| | | | | | | | | | R=darin@chromium.org BUG=92044 TEST= Review URL: http://codereview.chromium.org/8165009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104527 0039d316-1c4b-4281-b951-d872f2087c98
* Restore visibilty of Task Tracking via about:trackingjar@chromium.org2011-10-072-16/+17
| | | | | | | | | | | | | | This used to be about:tasks. That was taken over by the task manager, and merged in several files as though there was no distinction. The new URL is about:tracking. BUG=99121 r=msw Review URL: http://codereview.chromium.org/8133016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104524 0039d316-1c4b-4281-b951-d872f2087c98
* * Rename ScopedHDC to ScopedCreateDCyosin@chromium.org2011-10-071-8/+8
| | | | | | | | | | * Use ScopedSelectObject for changed files BUG=99139 TEST=no user visible change Review URL: http://codereview.chromium.org/8139022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104441 0039d316-1c4b-4281-b951-d872f2087c98
* Support scoped_refptr<> as the object for a method call in base::Bind(). ↵ajwong@chromium.org2011-10-072-3/+20
| | | | | | | | | | | | | | | Reduce useless copies. Patch up an API hole where you can't do base::Bind(&Foo::method, ptr), if ptr is a scoped_refptr. Also modify Unwrap() to remove a couple of unecessary copies for scoped_refptrs, and WeakPtrs<>. BUG=none TEST=none Review URL: http://codereview.chromium.org/8171013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104399 0039d316-1c4b-4281-b951-d872f2087c98
* Add RunAllPendingWithDispatcheroshima@google.com2011-10-062-0/+9
| | | | | | | | | | | On X11/Aura, MessagePumpX doesn't know how to dispatch event and needs explicit dispatcher to dispatch events. Thus, simply running RunAllPending can't run pending events if a dispatcher is not already set. This CL address this by adding new RunAllPendingWithDispatcher method. BUG=none TEST=views_unittests on X11/Aura runs without hang. Review URL: http://codereview.chromium.org/8173002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104324 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Fix views_unittests and aura_unittests on linux.sadrul@chromium.org2011-10-061-1/+1
| | | | | | | | | | | | | | | . Use NativeScrollBarViews in aura and wayland. . Disable clipboard-related tests in TextfieldViewsModelTest until aura on linux has clipboard support. . Use osmesa implementation for aura_unittests. TBR=evan@chromium.org BUG=97845, 99128 TEST=views_unittests passes on linux with use_aura Review URL: http://codereview.chromium.org/8143021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104220 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unnecessary #include <sys/nacl_syscalls.h>mcgrathr@chromium.org2011-10-052-5/+0
| | | | | | | | | | | | | | This header has never been needed by this code. We'd like to be able to remove it in the future. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2335 TEST= none R=brettw@chromium.org Review URL: http://codereview.chromium.org/8162006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104197 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate ui::NativeEvent and base::NativeEventoshima@google.com2011-10-053-9/+40
| | | | | | | | | | | Note: I didn't add Wayland version of NativeEvent because the type is defined in ui, which base shouldn't depend on. I looked at the original CL and this typedef in message_pump_wayland seems to be added after reviewer gave LGTM. BUG=none TEST=none Review URL: http://codereview.chromium.org/8113028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104123 0039d316-1c4b-4281-b951-d872f2087c98
* Switch over to base::Bind for base/debug/trace_event_unittests and base/files/*.jbates@chromium.org2011-10-054-16/+17
| | | | | | Review URL: http://codereview.chromium.org/8115013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104117 0039d316-1c4b-4281-b951-d872f2087c98
* Actually run the sanity tests under AddressSanitizer.glider@chromium.org2011-10-051-15/+33
| | | | | | Review URL: http://codereview.chromium.org/8116028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104093 0039d316-1c4b-4281-b951-d872f2087c98