summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* 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
* base::Bind: More converts, mostly in WebUI.jhawkins@chromium.org2011-10-042-2/+2
| | | | | | | | | | | BUG=none TEST=none R=csilv@chromium.org,ajwong@chromium.org Review URL: http://codereview.chromium.org/8113025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103978 0039d316-1c4b-4281-b951-d872f2087c98
* Annotate benign race for trace_event category enabled flag.jbates@chromium.org2011-10-041-0/+4
| | | | | | | | | BUG=98926 TEST=tsan Review URL: http://codereview.chromium.org/8124016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103924 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream: The test stub for Androidmichaelbai@google.com2011-10-043-0/+243
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/8086004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103912 0039d316-1c4b-4281-b951-d872f2087c98
* ntp4: fix app title directionalityestade@chromium.org2011-10-043-95/+148
| | | | | | | | | BUG=93339 TEST=manual Review URL: http://codereview.chromium.org/7779024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103904 0039d316-1c4b-4281-b951-d872f2087c98
* Add ScopedClosureRunner.sergeyu@chromium.org2011-10-043-0/+56
| | | | | | | | | | BUG=None TEST=Unittests Review URL: http://codereview.chromium.org/8120015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103900 0039d316-1c4b-4281-b951-d872f2087c98
* 1 Add ScopedGetDC and ScopedSelectObjectyosin@chromium.org2011-10-043-2/+74
| | | | | | | | | | | | | | | | | | | | | | * To mark@, sky@ ** base/win/scoped_hdc.h ** base/win/scoped_select_object.h 2 Fix leak in printing * To kmadhusu@ ** Play object creation command in metafile once ** Fix trivial leaks 3 Fix leak in SKIA * To twiz@ ** Fix font leak BUG=98523 TEST=Manual on Win7 Review URL: http://codereview.chromium.org/8084018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103852 0039d316-1c4b-4281-b951-d872f2087c98
* Consolidate message observer API for MessagePumpX and MessagePumWinoshima@google.com2011-10-046-51/+76
| | | | | | | | | | | This is an attempt to simplify the code around message pump observer. BUG=none TEST=none Review URL: http://codereview.chromium.org/8021009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103825 0039d316-1c4b-4281-b951-d872f2087c98
* Add trace code to track all posted tasks in message_loop and WorkerThreads ↵jbates@chromium.org2011-10-0310-133/+191
| | | | | | | | | | | | (non-official builds only). It's very helpful to understand what chrome is doing at runtime. Sometimes a thread in chrome does something expensive that causes a frame hitch. With this change, any expensive task will show up clearly in traces, with the file/function of where the task was posted. TEST=go to about:tracing, run a trace and notice that all tasks are traced. Review URL: http://codereview.chromium.org/7778033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103740 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream: Android's base.gyp and base.gypimichaelbai@google.com2011-10-032-5/+120
| | | | | | | | | | | | | - Added upstreamed files for Android platform. - Excluded the files related to icu and JNI, because third_party/icu can't compiled and JNI files have been uploaded yet. BUG= TEST= Review URL: http://codereview.chromium.org/8065017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103723 0039d316-1c4b-4281-b951-d872f2087c98
* Remove version hacks for platform version.rkc@chromium.org2011-10-032-13/+10
| | | | | | | | | | | | ChromeOS is now using platform numbers as intended, hence the hacks put in place to extract the platform numbers from the old ChromeOS version numbers are no longer needed. Removed them. R=davemoore@chromium.org,evan@chromium.org,zelidrag@chromium.org BUG=chromium-os:20934 TEST=Checked all places where the version shows up. On the latest build it was breaking, it shows correctly again after this fix. Review URL: http://codereview.chromium.org/8068028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103687 0039d316-1c4b-4281-b951-d872f2087c98
* Use NeedsScopedRefptrButGetsRawPtr instead of UnsafeBindtoRefCountedArg.ajwong@chromium.org2011-10-013-39/+72
| | | | | | | | | | | | | | | | | | Will's implementation of NeedsScopedRefptrButGetsRawPtr checks for refcounting by testing for converability of the pointer values to base::RefCounted and base::RefCountedThreadsafe. This happens to tolerate incomplete types in a sane way on linux where the check is enabled. UnsafeBindtoRefCountedArg's impelmentation relies on introspecting the type for the existence of a member function. Though this will catch refcounted objects with a refcount API that are not derived from base::RefCounted and base::RefCountedThreadsafe it requires complete types which places too strong of a constraint on what kinds of arguments can be bound. Since the majority (all?) refcounted types in Chromium are derived from base::RefCounted and base::RefCountedThreadsafe, this should be just as good of a guarantee. Bug filed to see if there's a way to adapt UnsafeBindtoRefCountedArg. BUG=94995,98732 TEST=new unittest. Review URL: http://codereview.chromium.org/8101008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103627 0039d316-1c4b-4281-b951-d872f2087c98
* gcc 4.6 warnings cleanuppph34r@gmail.com2011-09-301-0/+1
| | | | | | | | | | BUG=87490 TEST=compile with gcc 4.6 Review URL: http://codereview.chromium.org/8050008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103513 0039d316-1c4b-4281-b951-d872f2087c98
* Allow Bind() to take a Callback<> and bind all its free parameters.ajwong@chromium.org2011-09-305-0/+159
| | | | | | | | | | | | | | | | Basically, turns base::Callback<void(...)> to base::Closure. It turns out there are a number of use caess where an API takes a callback, and then wants to invoke the Callback on another thread. This piece of syntactic sugar removes the need for custom helper functions. This isn't quite full currying, however it is much simpler to implement. BUG=87287 TEST=none Review URL: http://codereview.chromium.org/8073012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103446 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream ProcessUtilTest, and make a few other files compile on Android.jingzhao@chromium.org2011-09-299-26/+80
| | | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/8059007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103236 0039d316-1c4b-4281-b951-d872f2087c98
* Make CrMallocErrorBreak die in a more spectacular fashion.rsesek@chromium.org2011-09-281-1/+2
| | | | | | | | | BUG=none TEST=Make crash stacks a little more obvious. Review URL: http://codereview.chromium.org/8065024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103209 0039d316-1c4b-4281-b951-d872f2087c98
* Update SHA1_LENGTH -> kSHA1Length to match previous change to SHA256_LENGTH.pkasting@chromium.org2011-09-284-25/+22
| | | | | | | | | | (I didn't try and understand or fix why kSHA1Length is in base:: while kSHA256Length is in crypto::.) BUG=92247 TEST=compiles Review URL: http://codereview.chromium.org/7972024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103179 0039d316-1c4b-4281-b951-d872f2087c98
* add missing, but used headersensonic@google.com2011-09-281-0/+10
| | | | | | | | | | | R=sky,sadrul BUG= TEST= Review URL: http://codereview.chromium.org/8004002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103123 0039d316-1c4b-4281-b951-d872f2087c98
* Remove chromeos specific debug code from tuple.hoshima@chromium.org2011-09-281-5/+1
| | | | | | | | | | | | This should have been removed as a part of 71680, but seems like I overlooked it. BUG=7327 TEST=none Review URL: http://codereview.chromium.org/8037050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103063 0039d316-1c4b-4281-b951-d872f2087c98
* Add new helper that can adapt Callbacks with return values for Closures.ajwong@chromium.org2011-09-282-9/+36
| | | | | | | | | | | This is helpful for reducing manually written static functions that just effectively just invoke the function and ignore the return value. BUG=87287 TEST=new unittest Review URL: http://codereview.chromium.org/8048008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103060 0039d316-1c4b-4281-b951-d872f2087c98
* Suppress benign race in ThreadTest.SleepInsideInitjochen@chromium.org2011-09-271-1/+5
| | | | | | | | | BUG=98219 TEST=none Review URL: http://codereview.chromium.org/8060011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102922 0039d316-1c4b-4281-b951-d872f2087c98
* Add "kSHA1Length" to base/sha1.h. This is a tiny piece of ↵pkasting@chromium.org2011-09-261-0/+1
| | | | | | | | | | http://codereview.chromium.org/7972024/ that's being landed first so that the third-party RLZ library can be updated to use it. BUG=92247 TEST=compiles git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102785 0039d316-1c4b-4281-b951-d872f2087c98
* Get gid of created folders from stat()ing the folders, not from getgid().skerner@chromium.org2011-09-261-34/+9
| | | | | | | | | BUG=97876 TEST=VerifyPathControlledByUserTest.* Review URL: http://codereview.chromium.org/8037014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102748 0039d316-1c4b-4281-b951-d872f2087c98
* Update Windows version macros to Win 7jschuh@chromium.org2011-09-262-3/+7
| | | | | | | BUG=92941 Review URL: http://codereview.chromium.org/8004004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102735 0039d316-1c4b-4281-b951-d872f2087c98
* Add comment about use of virtualjar@chromium.org2011-09-251-0/+5
| | | | | | | | | | | See request in comments within: http://codereview.chromium.org/159800/ r=wtc Review URL: http://codereview.chromium.org/7967018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102672 0039d316-1c4b-4281-b951-d872f2087c98
* touchui: support XInput2 multitouchsadrul@chromium.org2011-09-251-0/+13
| | | | | | | | | | | | | | Use XI2 multitouch events instead of mouse events as touch event input for touchui build. Note: XI MT will be supported in X server 1.12 and XI2.2. Please use build switch "use_xi2_mt=<minor version number>" to specify the minimum XI2 minor version. It is useful to test on experimental XI2.1 with MT support (e.g. build with use_xi2_mt=1). BUG=95150 TEST=(1) build with touchui=1 use_xi2_mt=1 (2) test on ubuntu 11.04 (X server 1.10 and XI2.1 with experimental MT support). (3) manually test if touch works on browser UI and JS touch events. Review URL: http://codereview.chromium.org/7792094 Patch from Ningxin Hu <ningxin.hu@intel.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102668 0039d316-1c4b-4281-b951-d872f2087c98
* Mark VerifyPathControlledByUserTest.* as FAILS_ on mac.thakis@chromium.org2011-09-241-3/+31
| | | | | | | | | | | BUG=97876 TEST=none TBR=skerner Review URL: http://codereview.chromium.org/8036012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102662 0039d316-1c4b-4281-b951-d872f2087c98
* wstring: remove SplitStringAlongWhitespace for wcharevan@chromium.org2011-09-233-26/+17
| | | | | | | | | | There was only one user, which did a bunch of nonsense. BUG=23581 Review URL: http://codereview.chromium.org/8008003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102563 0039d316-1c4b-4281-b951-d872f2087c98
* Add external extensions json source in proper mac location.skerner@google.com2011-09-223-13/+412
| | | | | | | | | | | The old path will be deprecated once developers have migrated. BUG=67203 TEST=FileUtilTest.IsPathControledByAdmin Review URL: http://codereview.chromium.org/7718021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102274 0039d316-1c4b-4281-b951-d872f2087c98
* This is a reapply of xji@google.com2011-09-212-0/+27
| | | | | | | | | | | | | | | | | | | http://src.chromium.org/viewvc/chrome?view=rev&revision=102006 fix know issues in RenderText 1. add tests. 2. change SelectWord() to use BreakIterator, so it works for Chinese and Complex script. 3. DELETE/ReplaceChar delete/replace a whole grapheme. ReplaceTextInternal should only replace one grapheme when there is no selection. 4. pointing to position outside of text returns HOME/END position. 5. based on Chrome Linux omnibox and gedit, given "abc| def", double click should select " " instead of "abc". Change test expectation. BUG=90426 TEST=compile with touchui=1 test omnibox. run views_unittests.NativeTextfieldViewsTest/TextfieldViewsModelTest Review URL: http://codereview.chromium.org/7841056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102160 0039d316-1c4b-4281-b951-d872f2087c98
* Delete Tracked, and move Location to its own file.ajwong@chromium.org2011-09-2118-172/+52
| | | | | | | | | | | | | The Birth/Death tracking of tasks has been moved out-of-band into MessageLoop's PendingTask structure. Thus, Task no longer needs to inherit from Tracked. Since Task was the only child of Tracked, delete the Tracked class and move Location to its own file. BUG=none TEST=builds Review URL: http://codereview.chromium.org/7879006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102132 0039d316-1c4b-4281-b951-d872f2087c98