summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Add include as recommended by the linux man page for realpath().skerner@chromium.org2010-05-121-0/+1
| | | | | | Review URL: http://codereview.chromium.org/1985018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47074 0039d316-1c4b-4281-b951-d872f2087c98
* Don't run FileUtilTest.RealPath under Valgrind on Mactimurrrr@chromium.org2010-05-121-0/+4
| | | | | | | | BUG=44001 TBR=thestig,glider Review URL: http://codereview.chromium.org/1979013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47045 0039d316-1c4b-4281-b951-d872f2087c98
* 40% speed up in parsing the /proc/<pid>/smaps file by changing ↵erg@chromium.org2010-05-122-22/+59
| | | | | | | | | | | | | | StringTokenizer. What used to take 10ms to parse now takes 6ms. - Profiling showed that doing the additional work to work with quotes added a bit of runtime, but most users don't use the optional quotes functionality. This speed parsing up by 20% by switching to a fast-path implementation, reverting to the slower path when necessary. - Eliminate temporary copies of tokens. This speeds up GetWorkingSetKBytes by another 20%. BUG=40033 TEST=Existing StringTokenizerTests. Review URL: http://codereview.chromium.org/1997017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47038 0039d316-1c4b-4281-b951-d872f2087c98
* Use realpath() to find the path to the extension unpack dir on posix systems.skerner@chromium.org2010-05-123-0/+68
| | | | | | | | | | | | | Extensions are unpacked by a sandboxed utility process. The sandbox forbids file access outside the directory the extension will be unpacked in. If the path to that directory contains a symbolic link, then unpacking will fail because following the link will cause file system access outside the sandbox path. Use realpath() to get a symlink free path to the directory where the extension will be unpacked. A similar issue exists on windows, with junctions instead of symlinks. This will be fixed in another change. BUG=13044,35198 TEST=FileUtilTest.RealPath Review URL: http://codereview.chromium.org/2001013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47032 0039d316-1c4b-4281-b951-d872f2087c98
* Don't run ConditionVariableTest.LargeFastTaskTest under Valgrind on Mactimurrrr@chromium.org2010-05-121-0/+2
| | | | | | | | TBR=glider,thestig BUG=43972 Review URL: http://codereview.chromium.org/2013018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47013 0039d316-1c4b-4281-b951-d872f2087c98
* [TTF] [GTTF] Implement the FAILS_ prefix for tests.phajdan.jr@chromium.org2010-05-121-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | After this change, the meaning of the prefixes is as follows: - DISABLED_: the test is not run unless --gtest_also_run_disabled_tests flag is used; should be used for tests that crash or exceed the time limit - FLAKY_: for tests that behave intermittently, and don't crash nor time out - FAILS_: for tests that fail consistently, but don't crash nor time out The Testing Task Force aims to run as much tests as possible, to keep the coverage high. The Green Tree Task Force aims to fix the flaky tests because they are unpredictable. To satisfy both goals, we should differentiate between the two cases, and that's why we have both the FLAKY_ and FAILS_ prefixes. When a test crashes or exceeds time limit (even intermittently), we have no choice other than disable it, and that's why we have DISABLED_ (and it's built-in the gtest framework anyway). TEST=none BUG=none Review URL: http://codereview.chromium.org/2015013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47011 0039d316-1c4b-4281-b951-d872f2087c98
* Speed up the Task Manager on linux.erg@chromium.org2010-05-114-16/+44
| | | | | | | | | | | | - Unify the calls to get shared memory and private memory. On Linux, these call the same API and on Linux, it takes >10ms to fetch both values each time it is called. - Cache the returned memory values. While sorting the task manager by memory, it would make the expensive memory call for each row on each sort operation. BUG=40033 TEST=Existing task manager tests. Review URL: http://codereview.chromium.org/2047009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46938 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the NowSingleton from time_win.cc.phajdan.jr@chromium.org2010-05-111-34/+29
| | | | | | | | | | | | | | Convert it to a set of static variables. This should help avoiding problems with very low-level Singletons. TEST=base_unittests and others BUG=none Review URL: http://codereview.chromium.org/1990005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46907 0039d316-1c4b-4281-b951-d872f2087c98
* FTP: fix navigating to files listed under non-ASCII charactersphajdan.jr@chromium.org2010-05-113-0/+59
| | | | | | | | | | | We need to convert the file name back to server encoding. BUG=38016 TEST=see bug Review URL: http://codereview.chromium.org/1857002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46900 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Don't crash when installing an extension if the gtk icon theme ↵craig.schlenter@chromium.org2010-05-111-1/+2
| | | | | | | | | | | | inherits from itself. Inheriting from itself means the theme is buggy but we shouldn't crash. BUG=43493 Review URL: http://codereview.chromium.org/2007007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46890 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using TimeTicks for profiling and histogramsjar@chromium.org2010-05-103-8/+10
| | | | | | | | | | | Avoid using wall clock time, which can be changed by the user, or impacted by Daylight Savings transitions etc. BUG=14193 r=eroman Review URL: http://codereview.chromium.org/1253005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46821 0039d316-1c4b-4281-b951-d872f2087c98
* use sysctl instead of /proc on FreeBSDpvalchev@google.com2010-05-101-2/+18
| | | | | | | | (unfortunately this approach is not available on OpenBSD though) patch from sprewell Review URL: http://codereview.chromium.org/1979006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46820 0039d316-1c4b-4281-b951-d872f2087c98
* Disable StatsTableTest.MultipleThreadsphajdan.jr@chromium.org2010-05-081-5/+2
| | | | | | | | | | | | | | | | | instead of using #if 0 (so that the code doesn't rot). This is http://codereview.chromium.org/1990007 done right, this time should not break tsan. TBR=maruel TEST=none BUG=10611 Review URL: http://codereview.chromium.org/2022003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46784 0039d316-1c4b-4281-b951-d872f2087c98
* Replace #if 0 used to disable test, the DISABLED_ and FLAKY_phajdan.jr@chromium.org2010-05-081-4/+2
| | | | | | | | | | | prefixes, so the code doesn't rot. TEST=none BUG=none Review URL: http://codereview.chromium.org/2035009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46782 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a few stray bits of win2k support.pkasting@chromium.org2010-05-072-11/+5
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1998012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46753 0039d316-1c4b-4281-b951-d872f2087c98
* This CL fixes issue 42867 - "OK" button disabled on "Edit Exception" dialog boxxji@chromium.org2010-05-072-3/+26
| | | | | | | | | | | | | | | | | | | | when URL is modified in non-empty input field - RTL In RTL chrome in windows, the text get from "Pattern" text field is wrapped with LRE/POP, which makes the pattern invalid. Trim explicit bidi control characters off in NativeTextfieldWin::GetText(). BUG=http://crbug.com/42867 TEST= 1. Launch Chrome with RTL language UI 2. click Wrench => Options => Under the Hood => Content settings => Exceptions => Edit... 3. modify an existing url on the Pattern field. The "OK" button should not be grayed out. Review URL: http://codereview.chromium.org/1703026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46751 0039d316-1c4b-4281-b951-d872f2087c98
* Revert StatsTableTest.MultipleThreads change which is failing tsan.shess@chromium.org2010-05-071-2/+4
| | | | | | | | | | | | | | | | Revert r46707: Mark StatsTableTest.MultipleThreads as flaky instead of using #if 0. TBR=maruel,phajdan.jr TEST=none BUG=10611 Review URL: http://codereview.chromium.org/2054003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46743 0039d316-1c4b-4281-b951-d872f2087c98
* Divert TRACE_EVENT macros to use Event Tracing for Windows on Windows builds.siggi@chromium.org2010-05-076-3/+551
| | | | | | | | | | | This is in preparation for instrumenting Chrome and Chrome Frame for performance measurements with ETW. BUG=none TEST=Unittests in this CL. Review URL: http://codereview.chromium.org/2020002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46734 0039d316-1c4b-4281-b951-d872f2087c98
* Add DCHECK to detect misuse of HISTOGRAM interface.jar@chromium.org2010-05-071-0/+10
| | | | | | | | | | | | | | | The interface (for perf reasons) snapshots the histogram name, and reuses it in future calls. As a result, any attempt to modulate (change) the name between call is ignored. This change uses a DCHECK to detect such abuse. BUG=43377 BUG=43375 r=vandebo Review URL: http://codereview.chromium.org/2019001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46726 0039d316-1c4b-4281-b951-d872f2087c98
* Windows: Make file_util::Delete("c:\\foo_dir", false) work correctly. Add ↵thestig@chromium.org2010-05-072-22/+143
| | | | | | | | | | more unit tests for Delete. BUG=42374 TEST=included Review URL: http://codereview.chromium.org/1763008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46725 0039d316-1c4b-4281-b951-d872f2087c98
* Use a reasonable default pthread stack size on Mac OS X.mark@chromium.org2010-05-071-0/+33
| | | | | | | | | | | | | Mac OS X uses a fixed default stack size of 512kB, which is too small for some purposes. glibc on Linux uses ulimit -s, which is both a more reasonable thing to do, and is generally set to a rational limit, such as 8MB. BUG=43422 TEST=None really on the trunk. On the Mac 375 branch, using the .pac file on the bug, Chrome should not crash on startup. Review URL: http://codereview.chromium.org/2035007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46717 0039d316-1c4b-4281-b951-d872f2087c98
* Mark StatsTableTest.MultipleThreads as flakyphajdan.jr@chromium.org2010-05-071-4/+2
| | | | | | | | | | | | | instead of using #if 0. TBR=maruel TEST=none BUG=10611 Review URL: http://codereview.chromium.org/1990007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46707 0039d316-1c4b-4281-b951-d872f2087c98
* Add a StaticMemorySingletonTraits class to allow constructing singletons in ↵siggi@chromium.org2010-05-073-34/+91
| | | | | | | | | | | | | | data segment. Change logging_win to use same. BUG=none TEST=Unittests in this change. Review URL: http://codereview.chromium.org/2023003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46686 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the dynamic_annotations build issues on Windowstimurrrr@chromium.org2010-05-073-3/+8
| | | | | | Review URL: http://codereview.chromium.org/1997007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46670 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt to fix a DCHECK failure related to usage of Singletonsphajdan.jr@chromium.org2010-05-071-0/+6
| | | | | | | | | | | | | | | | and WorkerPool. Also add a warning for users of WorkerPool that they need to be very careful about subtle issues. Also see discussion in http://codereview.chromium.org/1834002/show TEST=none BUG=30177 Review URL: http://codereview.chromium.org/2033001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46665 0039d316-1c4b-4281-b951-d872f2087c98
* Warn about unused results on release() for three scoped_ptr classes.estade@chromium.org2010-05-072-4/+6
| | | | | | | | | | | Depends on cleaning up existing uses of release(). BUG=42904 TEST=compile Review URL: http://codereview.chromium.org/1783015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46649 0039d316-1c4b-4281-b951-d872f2087c98
* Remove/update a bunch of references to the Google-internal bug tracker.evan@chromium.org2010-05-071-3/+0
| | | | | | | | | | Many of our references turn out to just be context for a given workaround, e.g. "Set the foobar here because the destructor dereferences it, see http://private-bug-url". Review URL: http://codereview.chromium.org/2004004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46645 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 46633 - Windows: Make file_util::Delete("c:\\foo_dir", false) work ↵zork@chromium.org2010-05-072-143/+22
| | | | | | | | | | | | | correctly. Add more unit tests for Delete. BUG=42374 TEST=included Review URL: http://codereview.chromium.org/1763008 TBR=thestig@chromium.org Review URL: http://codereview.chromium.org/2038004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46640 0039d316-1c4b-4281-b951-d872f2087c98
* Windows: Make file_util::Delete("c:\\foo_dir", false) work correctly. Add ↵thestig@chromium.org2010-05-062-22/+143
| | | | | | | | | | more unit tests for Delete. BUG=42374 TEST=included Review URL: http://codereview.chromium.org/1763008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46633 0039d316-1c4b-4281-b951-d872f2087c98
* Created a stock implementation of the MessageLoopProxy interface than can be ↵sanjeevr@chromium.org2010-05-068-1/+340
| | | | | | | | | | | used to create an implementation that targets the current thread's message loop. BUG=None TEST=Unit tests provided. Review URL: http://codereview.chromium.org/1837003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46591 0039d316-1c4b-4281-b951-d872f2087c98
* Mark TimeTicks.SubMillisecondTimers as flaky.phajdan.jr@chromium.org2010-05-061-1/+2
| | | | | | | | | | TBR=mbelshe TEST=none BUG=42850 Review URL: http://codereview.chromium.org/2000002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46585 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Remove npapi hack from basictypes.h now that npapi.h is fixed."evan@chromium.org2010-05-061-0/+10
| | | | | | | | This reverts commit r46528 because it broke the Chrome Frame build. Chrome Frame: why we can't have nice things. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46533 0039d316-1c4b-4281-b951-d872f2087c98
* Remove npapi hack from basictypes.h now that npapi.h is fixed.evan@chromium.org2010-05-061-10/+0
| | | | | | | | TEST=compiles on trybots Review URL: http://codereview.chromium.org/1954005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46528 0039d316-1c4b-4281-b951-d872f2087c98
* Valid FDs are >= 0 (> -1), not >= -1.mark@chromium.org2010-05-051-1/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1937008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46478 0039d316-1c4b-4281-b951-d872f2087c98
* Add logging to undersand exactly where CreateDirectory() is failing for users.skerner@google.com2010-05-051-2/+15
| | | | | | | | | BUG=35198 TEST=none Review URL: http://codereview.chromium.org/1948005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46468 0039d316-1c4b-4281-b951-d872f2087c98
* ScopedFD should handle EINTR on close.mark@chromium.org2010-05-051-2/+3
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1954003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46467 0039d316-1c4b-4281-b951-d872f2087c98
* Replace CHECK(false) by LOG(FATAL) where appropriate.evan@chromium.org2010-05-053-4/+4
| | | | | | | | | The difference is that the error message doesn't contain "Assertion failed: false". Review URL: http://codereview.chromium.org/1970001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46422 0039d316-1c4b-4281-b951-d872f2087c98
* TTF: Re-enable SplitStringIntoKeyValuePairsTest.EmptyString. Fix the casejhawkins@chromium.org2010-05-053-4/+26
| | | | | | | | | | | | where an empty pair would cause SplitStringIntoKeyValuePairs to report an error yet add the empty pair to the pairs list. Add more tests. BUG=none TEST=SplitStringIntoKeyValuePairsTest.*, StringUtilTest.SplitString Review URL: http://codereview.chromium.org/1971001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46420 0039d316-1c4b-4281-b951-d872f2087c98
* Small cleanups/style fixes. Simplifies RTL functions slightly.pkasting@chromium.org2010-05-052-28/+23
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1932006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46419 0039d316-1c4b-4281-b951-d872f2087c98
* Fix various uses of release() that did not check its valueestade@chromium.org2010-05-041-3/+4
| | | | | | | | | BUG=42904 TEST=compile, unit tests Review URL: http://codereview.chromium.org/1730024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46376 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up suppressing error dialogs for buildbots.phajdan.jr@chromium.org2010-05-044-12/+20
| | | | | | | | | | | | - also suppress dialogs caused by __debugbreak on Windows - avoid bad interactions with gtest (they cause odd problems, really) TEST=none BUG=29997 Review URL: http://codereview.chromium.org/1867001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46343 0039d316-1c4b-4281-b951-d872f2087c98
* Add clarity for the Command keycode now that things work for the Mac.jrg@chromium.org2010-05-042-1/+2
| | | | | | | | BUG=26102 Review URL: http://codereview.chromium.org/1893001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46305 0039d316-1c4b-4281-b951-d872f2087c98
* Changed UrlFetcher to use a MessageLoopProxy instead of directly relying on ↵sanjeevr@chromium.org2010-05-031-0/+3
| | | | | | | | | | | ChromeThread. This will allow us to make UrlFetcher independent of ChromeThread and we can then move it to chrome/common. BUG=None TEST=UrlFetcher unit-tests Review URL: http://codereview.chromium.org/1702016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46282 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Replace deprecated CommandLine::program() with ↵thestig@chromium.org2010-05-031-4/+3
| | | | | | | | | | | | | CommandLine::GetProgram(). Simplify a couple DCHECKs with DCHECK_EQ. Committing for Shriram Kunchanapalli (kshriram18@gmail.com) Original code review: http://codereview.chromium.org/413003/show BUG=none TEST=none Review URL: http://codereview.chromium.org/1733010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46281 0039d316-1c4b-4281-b951-d872f2087c98
* Add a macro to ignore the return value of a function.estade@chromium.org2010-05-031-0/+11
| | | | | | | | | | | | | | | | | | | | The more typical (void)(function()) does not work with GCC when explicitly marking the -Wunused-value attribute on a function. I plan to land the fix for bug 42904 in stages: 1) add this macro 2) fix some instance (either a misuse of release(), or just add this macro to it) 3) fix some instance (either a misuse of release(), or just add this macro to it) .... n - 1) fix some instance (either a misuse of release(), or just add this macro to it) n) enable the WARN_UNUSED_VALUE attribute on {scoped_ptr,scoped_ptr_malloc,scoped_array}.release() BUG=42904 TEST=none Review URL: http://codereview.chromium.org/1794012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46252 0039d316-1c4b-4281-b951-d872f2087c98
* Throw something at the wall. See what sticks.mark@chromium.org2010-04-302-2/+28
| | | | | | | | | | | | | This is an attempt to fix or defer WorkerPoolMac pool stoppage. 1. Catch Objective-C exceptions thrown in task bodies. 2. Make sure the queue isn't suspended when posting tasks. BUG=20471 TEST=none Review URL: http://codereview.chromium.org/1699029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46124 0039d316-1c4b-4281-b951-d872f2087c98
* Unpack extensions inside chrome's profile directory.skerner@chromium.org2010-04-307-18/+98
| | | | | | | | | | | Other users of the temp directory will be altered in a subsequent CL. BUG=13044 TEST=SandboxedExtensionUnpackerTest.*, ScopedTempDir.UniqueTempDirUnderPath, FileUtilTest.CreateNewTempDirInDirTest, manual testing on win, linux, mac. Review URL: http://codereview.chromium.org/1582022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46078 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: catch more crash-indicating signals for in-process crash dumping.phajdan.jr@chromium.org2010-04-301-3/+6
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/1801007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46043 0039d316-1c4b-4281-b951-d872f2087c98
* Implement UI automation on the Mac.jrg@chromium.org2010-04-291-1/+2
| | | | | | | | | | | | | | | | | | | Code is untested. From gChat: me: do you have a good test I can use to make sure mac impl of ui_controls for sending events works OK? Or would you prefer I send you CLs to play with and we iterate by hand? Joe: I would like the CL to play with to see if I can get it to work with the code I wrote Warning to Joe: mouse moved events currently use the Mac coordinate frame (0,0 is bottom-left not top-left). That's easy to switch; I'd like to do whatever is easiest to get WebDriver working. BUG=26102 Review URL: http://codereview.chromium.org/1701006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46005 0039d316-1c4b-4281-b951-d872f2087c98
* Extend Histogram class to support custom range definitionsjar@chromium.org2010-04-293-15/+205
| | | | | | | | | | | | | | | | | | Some users have a small sparsely separated enumerated list of plausible samples which don't fit well into a default (log space) histogarm, or a consistently spaced (LinearHistogram). This implementation does not yet support renderer histograms of this sort, but it at least unblocks the dependent bug that needs support for these sparse histograms in the browser. The bulk of this patch was written by Raman Tenetti, in CL 1706012. BUG=40953 r=eroman Review URL: http://codereview.chromium.org/1737017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45998 0039d316-1c4b-4281-b951-d872f2087c98