summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Revert 61269 (broke lots of browser and ui tests, like on your try run) - ↵thakis@chromium.org2010-10-022-12/+0
| | | | | | | | | | | | | | | | [GTK] delay reference count check in OwnedWidgetGtk It's a common problem that a GtkWidget will be referenced by an event that's currently on the callstack. These ref holders ignore the "destroy" signal, so when we go to destroy the owned widget, the refcount == 1 DCHECK fails. This change delays that DCHECK until the current stack has unwound, so we don't have to keep running into this. BUG=none TEST=in debug builds, Escape in a constrained window doesn't DCHECK, dragging a tab doesn't cause a DCHECK, pressing the custom frame [x] in lucid doesn't DCHECK; in general, no additional DCHECKs Review URL: http://codereview.chromium.org/3416032 TBR=estade@chromium.org Review URL: http://codereview.chromium.org/3564007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61283 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61272 - Fix windows build (missing include).thakis@chromium.org2010-10-022-1/+1
| | | | | | | | | | | | | TBR=thakis BUG=none TEST=compile Review URL: http://codereview.chromium.org/3533011 TBR=estade@chromium.org Review URL: http://codereview.chromium.org/3552006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61282 0039d316-1c4b-4281-b951-d872f2087c98
* Fix windows build (missing include).estade@chromium.org2010-10-022-1/+1
| | | | | | | | | | TBR=thakis BUG=none TEST=compile Review URL: http://codereview.chromium.org/3533011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61272 0039d316-1c4b-4281-b951-d872f2087c98
* [GTK] delay reference count check in OwnedWidgetGtkestade@chromium.org2010-10-022-0/+12
| | | | | | | | | | | It's a common problem that a GtkWidget will be referenced by an event that's currently on the callstack. These ref holders ignore the "destroy" signal, so when we go to destroy the owned widget, the refcount == 1 DCHECK fails. This change delays that DCHECK until the current stack has unwound, so we don't have to keep running into this. BUG=none TEST=in debug builds, Escape in a constrained window doesn't DCHECK, dragging a tab doesn't cause a DCHECK, pressing the custom frame [x] in lucid doesn't DCHECK; in general, no additional DCHECKs Review URL: http://codereview.chromium.org/3416032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61269 0039d316-1c4b-4281-b951-d872f2087c98
* Make the ref counts mutable, so we can ref count const objects.willchan@chromium.org2010-10-024-19/+19
| | | | | | Review URL: http://codereview.chromium.org/1575024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61263 0039d316-1c4b-4281-b951-d872f2087c98
* Made logging macros evaluate its stream arguments lazily.akalin@chromium.org2010-10-015-173/+320
| | | | | | | | | | | | | | | Also added logging unittests. BUG=57383 TEST=logging_unittest.cc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=61127 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=61142 Review URL: http://codereview.chromium.org/3575008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61249 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "FBTF: Another big ctor/dtor cleanup found by automated tools."erg@google.com2010-10-014-9/+2
| | | | | | | | | | | This reverts commit 27ea47d65cf8767f350113d5ad9e25170efde811 (r61237). BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3609005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61240 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Another big ctor/dtor cleanup found by automated tools.erg@google.com2010-10-014-2/+9
| | | | | | | | | | | (Shaves ~2MB off Linux Debug .a files) BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3563004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61237 0039d316-1c4b-4281-b951-d872f2087c98
* Clang: make DCHECK_EQ(string16, string16) work.thakis@chromium.org2010-10-012-0/+4
| | | | | | | | | | | | | | | | | | | The problem is that string16 is a typedef for a std::basic_string with a custom base::char_traits, hence ADL looks for operator<< only in std and base, not in the global namespace. Since adding stuff to the global namespace isn't permitted, move the operator to namespace base instead. Also give WebString an explicit operator<< because clang can't figure out that it can use WebString's |operator string16| to print WebStrings. string16 is just wstring on windows, and gtest has special code to make printing wstrings to non-wide ostreams work already, so nothing is required on windows. Fix a few other minor issues. Based on a patch by hans@chromium.org BUG=57294 TEST=still compiles with gcc, fewer build errors in tests with clang Review URL: http://codereview.chromium.org/3515003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61218 0039d316-1c4b-4281-b951-d872f2087c98
* Solved a problem where a string was supposed to be passed as a reference but ↵hansl@google.com2010-10-011-12/+22
| | | | | | | | | | | | was instead passed by value. Also, if CreateMutex returns NULL (for the lock), try to call the Debugger and return nicely. TEST=none BUG=none Review URL: http://codereview.chromium.org/3589002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61191 0039d316-1c4b-4281-b951-d872f2087c98
* Update Dr. Memory suppressions, gtest_filters and also skip oob-write sanity ↵timurrrr@chromium.org2010-10-012-0/+9
| | | | | | | | | tests on Windows. TBR=glider Review URL: http://codereview.chromium.org/3616001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61171 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome side of consolidating zoom code for pepper plugins (i.e. pdf) and the ↵jam@chromium.org2010-10-012-0/+11
| | | | | | | | rest of Chrome. Allows plugins to have different zoom ranges, and also to update zoom on its own. Review URL: http://codereview.chromium.org/3419023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61153 0039d316-1c4b-4281-b951-d872f2087c98
* Fix official build breakage.akalin@chromium.org2010-10-011-2/+0
| | | | | | | | | | BUG=None TEST=Tested compile with official mode flags TBR=hbono Review URL: http://codereview.chromium.org/3528007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61150 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61142 - Made logging macros evaluate its stream arguments lazily.akalin@chromium.org2010-10-015-286/+188
| | | | | | | | | | | | | | | | Also added logging unittests. BUG=57383 TEST=logging_unittest.cc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=61127 Review URL: http://codereview.chromium.org/3575008 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/3527004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61143 0039d316-1c4b-4281-b951-d872f2087c98
* Made logging macros evaluate its stream arguments lazily.akalin@chromium.org2010-10-015-188/+286
| | | | | | | | | | | | | Also added logging unittests. BUG=57383 TEST=logging_unittest.cc Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=61127 Review URL: http://codereview.chromium.org/3575008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61142 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61127 - Made logging macros evaluate its stream arguments lazily.akalin@chromium.org2010-09-305-259/+186
| | | | | | | | | | | | | | Also added logging unittests. BUG=57383 TEST=logging_unittest.cc Review URL: http://codereview.chromium.org/3575008 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/3606003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61129 0039d316-1c4b-4281-b951-d872f2087c98
* Made logging macros evaluate its stream arguments lazily.akalin@chromium.org2010-09-305-186/+259
| | | | | | | | | | | Also added logging unittests. BUG=57383 TEST=logging_unittest.cc Review URL: http://codereview.chromium.org/3575008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61127 0039d316-1c4b-4281-b951-d872f2087c98
* [Cleanup] Consolidated duplicate definitions of DLOG.akalin@chromium.org2010-09-301-106/+98
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/3551006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61113 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move ctors/dtors into implementation files. Adds ctors/dtors to ↵erg@google.com2010-09-302-15/+42
| | | | | | | | | | | | | | non-POD structs. Cuts ~2MB off our .a files (Debug, Linux). Also added the "virtual" keyword on a whole bunch of virtual dtors that were missing it. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3522004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61100 0039d316-1c4b-4281-b951-d872f2087c98
* Mark the most common uses of MakeCheckOpString as extern templates on gcc ↵erg@google.com2010-09-302-8/+29
| | | | | | | | | | | | | | platforms. Remove broken template specializations that were never instantiated that references extern code that doesn't exist in the project (!). BUG=none TEST=compiles, smaller binaries on linux, chromeos and mac Review URL: http://codereview.chromium.org/3594003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61092 0039d316-1c4b-4281-b951-d872f2087c98
* Fix flakey timer test.mbelshe@chromium.org2010-09-301-9/+16
| | | | | | | | | | | | | The goal of the test is to verify that the HighResNow() clock has faster than 15ms precision. Modify the test to not depend on how long Sleep() takes in order to verify this. BUG=50291 TEST=TimeTicks.HighResNow Review URL: http://codereview.chromium.org/3452018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61068 0039d316-1c4b-4281-b951-d872f2087c98
* If VlogTest.Perf is ran under Valgrind, decrease the number of benchmarkglider@chromium.org2010-09-301-3/+5
| | | | | | | | | | iterations. Otherwise the test may time out due to slowdown. TBR=akalin Review URL: http://codereview.chromium.org/3578004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61053 0039d316-1c4b-4281-b951-d872f2087c98
* Removed support for log prefix filters.akalin@chromium.org2010-09-302-24/+0
| | | | | | | | | | | No one is using this, and this is obsoleted by --vmodule. BUG=56965 TEST=None Review URL: http://codereview.chromium.org/3596003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61035 0039d316-1c4b-4281-b951-d872f2087c98
* symbolize: don't stringify errno if we're using google::Symbolize.evan@chromium.org2010-09-291-6/+13
| | | | | | | | | | | | This prevents us from printing out confusing error messages like: Unable to get symbols for backtrace (Success). BUG=57305 TEST=ran locally, saw no error Review URL: http://codereview.chromium.org/3544004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61010 0039d316-1c4b-4281-b951-d872f2087c98
* [clang] Fixed clang compile failure introduced by 60976.akalin@chromium.org2010-09-291-3/+4
| | | | | | | | | | | | Put GetVlogLevelHelper definition before GetVlogLevel definition. gcc/msvc is fine with this, but not clang (correctly). BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3525006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60991 0039d316-1c4b-4281-b951-d872f2087c98
* shared_memory: improve error messages on failure.evan@chromium.org2010-09-291-4/+11
| | | | | | | | | | | | | | | | | Be careful to leave errno untouched if the file open fails, so that the latter logging statements that print errno will print the right message. Also format the logging text such that the perror-like output (appending text like ": Permission denied") makes more sense. Previously we'd end up printing text like Try [...] to fix.: Permission denied BUG=57305 TEST=shared_memory_unittest should still pass Review URL: http://codereview.chromium.org/3517003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60986 0039d316-1c4b-4281-b951-d872f2087c98
* shared_memory: remove wstrings, fix callers.evan@chromium.org2010-09-296-36/+35
| | | | | | | | | BUG=23581 TEST=compiles Review URL: http://codereview.chromium.org/3555002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60985 0039d316-1c4b-4281-b951-d872f2087c98
* Implemented VLOG() et al.akalin@chromium.org2010-09-2911-5/+322
| | | | | | | | | | | | | | Implemented VLOG(), VLOG_IF(), VLOG_IS_ON(). Added --v and --vmodule switches. Changed some spammy sync-related logs to use VLOG. BUG=56965 TEST=New unittests Review URL: http://codereview.chromium.org/3448028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60976 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Moves code to the headers.erg@google.com2010-09-2813-12/+86
| | | | | | | | | | | | | One of the big things is starting to move/declare ctors/dtors that derive from RefCounted<> to/in the implementation file. (Saves 4 megabytes from libglue.a alone. 1 meg off libbrowser.a. Hundred of kilobyte savings in a large number of .a files; only libmedia.a grew and it's only 100k.) BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3452030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60863 0039d316-1c4b-4281-b951-d872f2087c98
* base_unittests: cut a sleep down to 1 second by being more careful about time.evan@chromium.org2010-09-281-6/+23
| | | | | | | | TEST=WatchdogTest.DisarmTest doesn't go flaky Review URL: http://codereview.chromium.org/3545001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60853 0039d316-1c4b-4281-b951-d872f2087c98
* Try to preclude flakiness in test.jar@chromium.org2010-09-281-51/+61
| | | | | | | | | | | | | | | | | | | | I adjusted the test to not depend on timed waits, but instead to spin-wait until stable states are reached. This test will now fail (slowly) as though via an infinite loop, if ever the expected conditions are not met. It should also run very fast, and succeed quickly in the expected cases (and usually fail quickly when there is a minor regression). Bottom line: Hopefully flakiness is gone. BUG=10607 r=wtc Review URL: http://codereview.chromium.org/3462013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60797 0039d316-1c4b-4281-b951-d872f2087c98
* Ignore error (especially don't log) from pthread_setname(), it's harmless.pinkerton@chromium.org2010-09-281-2/+3
| | | | | | | | BUG=47058 TEST=none Review URL: http://codereview.chromium.org/3415025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60783 0039d316-1c4b-4281-b951-d872f2087c98
* The return value of ClosePlatformFile() was reversed in r59041. Mostdumi@chromium.org2010-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | calls to ClosePlatformFile() ignore the return value, but there are two calls that do use it: 1. webkit/glue/webfileutilities_impl.cc, closeFile() method: i talked to jianli who changed that method most recently, and he said he prefers the handle to be reset to base::kInvalidPlatformFileValue if ClosePlatformFile() succeeded, so no change is needed to that code. 2. webkit/database/database_tracker.cc, CloseIncognitoFileHandle(): this code needs to be updated. TEST=WebSQLDBs don't crash in incognito mode. BUG=56237 Review URL: http://codereview.chromium.org/3387018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60685 0039d316-1c4b-4281-b951-d872f2087c98
* Fail to create a directory if there is a file in the path to be created.skerner@chromium.org2010-09-271-0/+1
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/3444023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60657 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the hack in string_util for RLZ library.tfarina@chromium.org2010-09-271-17/+0
| | | | | | | | | | | The rlz library was updated to include the right header from these string functions. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3506003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60636 0039d316-1c4b-4281-b951-d872f2087c98
* file_util_proxy: fix a typo that caused us to ignore a path.evan@chromium.org2010-09-241-1/+1
| | | | | | | | | | This was found by the Clang bot! TEST=compiles Review URL: http://codereview.chromium.org/3470015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60512 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a bug in the string wrapper for SHA256HashString.bryner@chromium.org2010-09-242-1/+20
| | | | | | | | | | | | | The wrapper was using the size of the input string as the number of hash bytes to compute, rather than the size of the output string (SHA256_LENGTH). Added a test for this. BUG=none TEST=Sha256Test.Test1_String Review URL: http://codereview.chromium.org/3492008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60491 0039d316-1c4b-4281-b951-d872f2087c98
* Include log output in buildbot logs on Windows just as darin@chromium.org2010-09-241-15/+2
| | | | | | | | | | | | | we do on Linux and Mac. This can be very helpful when trying to debug flaky tests. R=erikkay BUG=none TEST=none Review URL: http://codereview.chromium.org/3435027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60472 0039d316-1c4b-4281-b951-d872f2087c98
* Remove logging for issue 35198.skerner@chromium.org2010-09-242-53/+8
| | | | | | | | | | | Remove switch --issue35198-logging . BUG=56664 TEST=Install an extension on all platforms. Review URL: http://codereview.chromium.org/3427019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60471 0039d316-1c4b-4281-b951-d872f2087c98
* base: Finish moving the SplitString functions from string_util.h to ↵tfarina@chromium.org2010-09-249-157/+151
| | | | | | | | | | | string_split.h BUG=None TEST=trybos Review URL: http://codereview.chromium.org/3447008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60422 0039d316-1c4b-4281-b951-d872f2087c98
* Adding a FileUtilProxy::TouchFile() method that takes a FilePath as andumi@chromium.org2010-09-242-0/+45
| | | | | | | | | | | | argument (instead of PlatformFile). BUG=none TEST=none Review URL: http://codereview.chromium.org/3380024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60397 0039d316-1c4b-4281-b951-d872f2087c98
* base_unittests: Turn down the sleeps on the stats table tests.evan@chromium.org2010-09-231-15/+23
| | | | | | | | | | | | These tests are over 20% of the time taken by base_unittests. I don't think making these sleeps shorter should affect their reliability too much. BUG=10611 Review URL: http://codereview.chromium.org/3474009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60385 0039d316-1c4b-4281-b951-d872f2087c98
* Add a TouchFile() function that takes a FilePath argument.dumi@chromium.org2010-09-237-24/+46
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3496005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60381 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Move virtual methods to implementation files.erg@google.com2010-09-235-86/+136
| | | | | | | | | | | Remove logging.h and other headers where possible. BUG=none TEST=none Review URL: http://codereview.chromium.org/3461019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60369 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add a TouchFile function that operates on FilePaths + fixing a bug"maruel@chromium.org2010-09-237-46/+24
| | | | | | | | | | | | This reverts commit 60322. TBR=dumi TEST=none BUG=none Review URL: http://codereview.chromium.org/3439019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60327 0039d316-1c4b-4281-b951-d872f2087c98
* Add a TouchFile function that operates on FilePaths + fixing a bugdumi@chromium.org2010-09-237-24/+46
| | | | | | | | | | | related to FILE_WRITE_ATTRIBUTES on Windows. BUG=none TEST=FileUtilTest::TouchFile Review URL: http://codereview.chromium.org/3404018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60322 0039d316-1c4b-4281-b951-d872f2087c98
* The submillisecond test was broken in at least two ways. First, thembelshe@chromium.org2010-09-233-16/+27
| | | | | | | | | | | | | | | | | high resolution clock is intentionally disabled on some systems (old AMDs). If QueryPerformanceCounter doesn't work on this system, we shouldn't run the test. Second, however, if the time between two HighResNow() calls is *always* 0us, then this test would fail. Due to speedstep technology with intentionally underclocked QPC (at the windows level), this is quite possible. BUG=42850 TEST=TimeTicks.SubMillisecondTimers Review URL: http://codereview.chromium.org/3387011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60293 0039d316-1c4b-4281-b951-d872f2087c98
* Quick-fix the compliation error on Windowstimurrrr@chromium.org2010-09-231-1/+1
| | | | | | | TBR=phajdan.jr,glider Review URL: http://codereview.chromium.org/3413032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60272 0039d316-1c4b-4281-b951-d872f2087c98
* Add two tests for uninit reads to ToolsSanityTeststimurrrr@chromium.org2010-09-231-0/+9
| | | | | | | TEST=./tools/valgrind/chrome_tests.sh -t base --gtest_filter="Sanity*" on Linux and Mac Review URL: http://codereview.chromium.org/3470006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60271 0039d316-1c4b-4281-b951-d872f2087c98
* Pull latest PPAPI. Change key handling to support the new API.brettw@chromium.org2010-09-232-2/+23
| | | | | | | | TEST=PPAPI UI tests BUG=none Review URL: http://codereview.chromium.org/3386019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60258 0039d316-1c4b-4281-b951-d872f2087c98