summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Work around a stupid Purify bug that was causing lots of bogus messages to ↵erikkay@google.com2009-01-152-15/+19
| | | | | | | | | | | | | | | | appear when running base_unittests.exe. Also change perf_test_suite to call TestSuite::Initialize() prior to its other work to ensure that superclass initialization happens first. BUG=6436 This bug wound up being introduced with change: http://codereview.chromium.org/18003 Review URL: http://codereview.chromium.org/18074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8055 0039d316-1c4b-4281-b951-d872f2087c98
* scoped_bstr and StackBstr implementations. The scoped_bstr class is a ↵tommi@chromium.org2009-01-147-0/+332
| | | | | | | | | | | wrapper around BSTR system calls with some added functionality. StackBstr is for those times when you need to pass a fixed string to a function but visiting the heap etc to allocate a new BSTR can be avoided. StackBstr not zero cost, but much cheaper than creating a new BSTR like we currently do in many places. Review URL: http://codereview.chromium.org/18006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8011 0039d316-1c4b-4281-b951-d872f2087c98
* Report name of repeatedly registered histogramsjar@chromium.org2009-01-141-2/+6
| | | | | | | | | | | | | Histograms should ONLY be listed once in the code for a given process (the browser process?). If two or more histograms have the same name, it is an error, and a DCHECK will fire. This code will also display the name of the offending histogram. r=sky Review URL: http://codereview.chromium.org/16609 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8009 0039d316-1c4b-4281-b951-d872f2087c98
* Call logging::InitLogging. The lack of this was causing some hangs (and ↵erikkay@google.com2009-01-1310-41/+84
| | | | | | | | | | | possibly crashes) in ObserverListTest.BUG=6286 This CL has expanded to include some cleanup and refactoring of test_suite and related files, so that this logging change (and other improvements) are applied to all unit tests. Review URL: http://codereview.chromium.org/18003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7977 0039d316-1c4b-4281-b951-d872f2087c98
* Fix TODOs in base/ :phajdan.jr@chromium.org2009-01-132-8/+10
| | | | | | | | | | - switch to FilePath inside CopyDirectory - be less racy in ProcessUtilTest.KillSlowChild Review URL: http://codereview.chromium.org/17013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7948 0039d316-1c4b-4281-b951-d872f2087c98
* Port crash_cache tool to Linux.phajdan.jr@chromium.org2009-01-133-0/+40
| | | | | | Review URL: http://codereview.chromium.org/17353 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7939 0039d316-1c4b-4281-b951-d872f2087c98
* Inline the TimeDelta::From* construction functions.deanm@chromium.org2009-01-132-30/+32
| | | | | | | | | With GCC, we don't have much hope of inlining unless the defintion is in the header. This should also hopefully allow the compiler to do things like constant folding on the multiplications, etc. Review URL: http://codereview.chromium.org/17802 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7928 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a typo in a comment.deanm@chromium.org2009-01-131-1/+1
| | | | | | | Review URL: http://codereview.chromium.org/17630 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7923 0039d316-1c4b-4281-b951-d872f2087c98
* Removing unnecessary include that broke the dependency tests.tommi@chromium.org2009-01-121-1/+0
| | | | | | | | TBR=maruel Review URL: http://codereview.chromium.org/17622 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7897 0039d316-1c4b-4281-b951-d872f2087c98
* fix linux build: don't inline in cc filetc@google.com2009-01-121-4/+4
| | | | | | | Review URL: http://codereview.chromium.org/17619 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7894 0039d316-1c4b-4281-b951-d872f2087c98
* com_ptr implementation. This is a fairly simple implementation of a smart ↵tommi@chromium.org2009-01-125-2/+214
| | | | | | | | | | | class specifically meant for IUnknown derived COM interfaces. The class gets much of its functionality from the already existing scoped_refptr but adds a few COM specific methods and some that scoped_refptr doesn't already have, yet are often necessary such as Receive(), Detach() and Attach(). I went with caps for the first letter of method names, but for the three I just mentioned, it might be prettier to have them in all lower case to better match with methods from the parent class. Let me know what you think. Review URL: http://codereview.chromium.org/17473 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7890 0039d316-1c4b-4281-b951-d872f2087c98
* Updates to Visual Studio project generation to accomodatesgk@google.com2009-01-105-30/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recent changes and get rid of cut-and-paste: * Add generation of the new net_resource.vcproj file. * Accomodate the net\net.vsprops file. * New base.vcproj dependency in activex_shim_dll.vcproj. * New tld_cleanup.vcproj dependency in net.vcproj. * New ondemand_updates.vcproj dependencies in gcapi_{dll,lib}.vcproj. * Re-order dump_cache.vcproj dependencies to match new checked-in solutions. * New input file directory layout in zlib (minizip folder) and testing\gtest (hierarchy). * Use a new dest= argument to ChromeMSVSSolution() and ChromeMSVSProject() to get rid of cut-and-pste installation code, and provide a central point for controlling when/whether we want to generate the files only under the build directory, or drop them in place for checking in. * Comment out an unnecessarily verbose warning if the buildtarget is executed with an action that we don't map to specific Visual Studio settings. Sometimes this is normal and okay, but the warning should get restored at some point when we work out the precise conditions under which it makes sense. Review URL: http://codereview.chromium.org/17602 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7856 0039d316-1c4b-4281-b951-d872f2087c98
* Changing access to scoped_refptr member variables from private to protected.tommi@chromium.org2009-01-102-1/+17
| | | | | | | | This is required to be able to extend the functionality of the class where existing public functionality does not offer sufficient access. Review URL: http://codereview.chromium.org/17464 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7851 0039d316-1c4b-4281-b951-d872f2087c98
* Move Contains() method to file_utils, stop relying on in extensions_protocolaa@chromium.org2009-01-096-79/+76
| | | | | | Review URL: http://codereview.chromium.org/16805 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7841 0039d316-1c4b-4281-b951-d872f2087c98
* Add implementations of various extension related methods (derived from ↵erikkay@google.com2009-01-094-17/+282
| | | | | | | | | | | | file_util): Extension, RemoveExtension, InsertBeforeExtension, ReplaceExtension I didn't reimplement the old file_util ones since they actually modify the FilePath in place, which isn't the style of the rest of the FilePath methods. I'll file a cleanup bug after this for callers to switch to the new methods. Review URL: http://codereview.chromium.org/17243 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7811 0039d316-1c4b-4281-b951-d872f2087c98
* Move the vector canvas unit test data to the skia/ext directory. It wasn'tbrettw@chromium.org2009-01-0884-0/+0
| | | | | | | | | | | trivial to move the directory the way the test code was laid out (since we now add two levels) so I refactored it a bit to get rid of the base class (which wasn't actually used for anything useful). BUG=5016 Review URL: http://codereview.chromium.org/16550 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7756 0039d316-1c4b-4281-b951-d872f2087c98
* Data pack file reader and unit test, used for resources on Linux.evan@chromium.org2009-01-086-0/+203
| | | | | | | | | See http://dev.chromium.org/developers/design-documents/linuxresourcesandlocalizedstrings for more details. Review URL: http://codereview.chromium.org/17253 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7751 0039d316-1c4b-4281-b951-d872f2087c98
* Significantly increase timeouts to reduce flakinessjar@google.com2009-01-081-8/+7
| | | | | | | | | | | | | | | | | Several tests now "plan for success" and will terminate rapidly if all goes well (and will hang if there really is a problem). One test I just upped by a factor of 5, hoping that I'll get a timem slice within a 5 second window, rather than assuming that I'll get one within a 1 second window. I could go further, but the test now takes over 5 seconds to run, which seems like a lot of time for a trivial test. bug=5723 r=maruel Review URL: http://codereview.chromium.org/16495 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7744 0039d316-1c4b-4281-b951-d872f2087c98
* Don't DCHECK if a watched directory doesn't exist.aa@chromium.org2009-01-072-3/+10
| | | | | | | | | The caller can't easily check whether a directory exists before calling this functions. Also modify GreasemonkeyMaster to allow this condition. Review URL: http://codereview.chromium.org/16580 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7687 0039d316-1c4b-4281-b951-d872f2087c98
* Convert download manager to FilePath.estade@chromium.org2009-01-064-13/+26
| | | | | | | | (Fixed up version of issue 17032. Now passes all unit tests.) Review URL: http://codereview.chromium.org/16533 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7630 0039d316-1c4b-4281-b951-d872f2087c98
* Butcher some files to make ui_tests run 0 tests on Linux.evanm@google.com2009-01-061-0/+6
| | | | | | | Review URL: http://codereview.chromium.org/16545 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7613 0039d316-1c4b-4281-b951-d872f2087c98
* Move plugins to FilePaths, some cleanupavi@google.com2009-01-062-6/+11
| | | | | | Review URL: http://codereview.chromium.org/16456 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7588 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup base/watchdog thread delegate.phajdan.jr@chromium.org2009-01-062-5/+5
| | | | | | Review URL: http://codereview.chromium.org/17038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7585 0039d316-1c4b-4281-b951-d872f2087c98
* Keep trying to undo 7564.estade@chromium.org2009-01-055-10/+7
| | | | | | | | tbr=jhawkins Review URL: http://codereview.chromium.org/17062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7572 0039d316-1c4b-4281-b951-d872f2087c98
* Unbreak unit tests. Revert r7564.estade@chromium.org2009-01-056-27/+16
| | | | | | | | tbr=jhawkins Review URL: http://codereview.chromium.org/16522 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7571 0039d316-1c4b-4281-b951-d872f2087c98
* * switch download manager to using FilePathestade@chromium.org2009-01-053-6/+20
| | | | | | | | | * add empty() function to FilePath * implement file_util::GetFileExtensionFromPath Review URL: http://codereview.chromium.org/17032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7564 0039d316-1c4b-4281-b951-d872f2087c98
* Watchdog test is flaky, try relaxing timeout.dkegel@google.com2009-01-051-1/+2
| | | | | | | (2nd try at getting a review, this time with nsylvain.) Review URL: http://codereview.chromium.org/16474 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7558 0039d316-1c4b-4281-b951-d872f2087c98
* Move KillProcess from linux to posix so it can be used on the Mac.dkegel@google.com2009-01-052-24/+25
| | | | | | | | This was originally part of http://codereview.chromium.org/16207 and is broken out here so I can get the small stuff out of the way. Review URL: http://codereview.chromium.org/16498 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7554 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some leaks in observer_list_unittesterikkay@google.com2009-01-051-1/+2
| | | | | | Review URL: http://codereview.chromium.org/16505 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7551 0039d316-1c4b-4281-b951-d872f2087c98
* clean up line endingphajdan.jr@chromium.org2009-01-051-3/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7548 0039d316-1c4b-4281-b951-d872f2087c98
* Update some comments/nits following r7486.ericroman@google.com2009-01-053-16/+14
| | | | | | Review URL: http://codereview.chromium.org/17047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7547 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 7537. DirectoryWatcherTest.SubDir was passing on my XP box, but ↵phajdan.jr@chromium.org2009-01-032-23/+15
| | | | | | | | | fails on the buildbot. TBR=maruel Review URL: http://codereview.chromium.org/17048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7538 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enable DirectoryWatcherTest.SubDir on Vistaphajdan.jr@chromium.org2009-01-032-15/+23
| | | | | | | | BUG=5072 Review URL: http://codereview.chromium.org/17046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7537 0039d316-1c4b-4281-b951-d872f2087c98
* Try to consistently use arraysize() with strlcpy().deanm@chromium.org2009-01-021-1/+1
| | | | | | | | | For a char*, sizeof() == arraysize(), so there is nothing wrong with the current code. However I think it's important to be clear that the lcpy() functions work in characters and not bytes. The danger would be accidently using sizeof() with wcslcpy, for example copying some code as an example or modifying old code to use a wchar instead of a char. Review URL: http://codereview.chromium.org/17019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7536 0039d316-1c4b-4281-b951-d872f2087c98
* Enable tracing on non-windows platforms.dkegel@google.com2008-12-311-9/+0
| | | | | | | | | | This was LGTM by erikkay in code review 16207, and I meant to commit it as part of code review 16467, but dropped it by accident. Review URL: http://codereview.chromium.org/17031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7521 0039d316-1c4b-4281-b951-d872f2087c98
* Processes take a long time to start if started via ssh,dkegel@google.com2008-12-301-1/+1
| | | | | | | | | | | | | as they now have to connect to the X server (not sure when we added that, or where, but it's happening). In my case, when running ProcessUtilTest.SpawnChild, it takes 1.7 seconds after the main process starts waiting for the child before the child finishes reading from the X server and exits. So raise timeout from one second to five seconds. Review URL: http://codereview.chromium.org/17022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7506 0039d316-1c4b-4281-b951-d872f2087c98
* Provide and use auto startup/teardown for tracked objectsjar@google.com2008-12-301-6/+32
| | | | | | | | | | Avoid races with message loop teardown r=nsylvain Review URL: http://codereview.chromium.org/17023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7503 0039d316-1c4b-4281-b951-d872f2087c98
* Remove compatibility #defines in string_util.hphajdan.jr@chromium.org2008-12-301-9/+0
| | | | | | Review URL: http://codereview.chromium.org/17014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7499 0039d316-1c4b-4281-b951-d872f2087c98
* Change the signature of JSONReader::Read() and relatedaa@chromium.org2008-12-294-424/+307
| | | | | | | | | methods to be more friendly to use with scoped_ptr. Change all the callsites. Review URL: http://codereview.chromium.org/16270 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7486 0039d316-1c4b-4281-b951-d872f2087c98
* * Bring up render_mesages.cc on POSIX.jeremy@chromium.org2008-12-292-0/+18
| | | | | | | | | * Add Pickle::Read/WriteUint32 & ParamTraits<uint32>. * Removed NSEvent from WebInputEvent since it appears not to be needed anymore. Review URL: http://codereview.chromium.org/16479 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7484 0039d316-1c4b-4281-b951-d872f2087c98
* Mass convert ChromeStaticLibrary -> ChromeLibrary, including pulling the ↵evanm@google.com2008-12-262-2/+2
| | | | | | | | | | | updated ICU dep that uses it as well. Add a SHARED scons command-line flag to build shared libraries. Review URL: http://codereview.chromium.org/16477 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7479 0039d316-1c4b-4281-b951-d872f2087c98
* Provide an unimplemented function to appease the dynamic linker.evanm@google.com2008-12-262-0/+17
| | | | | | | Review URL: http://codereview.chromium.org/16262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7470 0039d316-1c4b-4281-b951-d872f2087c98
* Initial subset of .vcproj file generation, covering generation of:sgk@google.com2008-12-245-86/+467
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | base\build\base.vcproj base\build\base_gfx.vcproj base\build\base_unittests.vcproj base\build\debug_message.vcproj skia\skia.vcproj testing\gtest.vcproj third_party\icu38\icu.vcproj third_party\icu38\icudt.vcproj third_party\libpng\libpng.vcproj third_party\zlib\zlib.vcproj Supporting work in *.scons files: * Adds .h files to the input_files lists in the various *.scons files. * Add arguments to ChromeMSVSProject() to actually generate the .vcproj files. * Add MSVS.AddConfig() calls to the *.scons files to preserve the .vsprops inclusion in the generated .vcproj files. (These will go away eventually as we migrate away from .vsprops in favor of using the settings from the SCons configuration.) * Add MSVS.AddConfig() calls to preserve the .vsprops inclusion. * Move the special generation of dmg_fp/*.cc files ahead of the input file list so we can list the generated object files. * Change the 'solutions' Alias to 'msvs' so we don't mislead about what will actually be generated. Updates to the new _Node_MSVS.py module with latest from upstream prototype development: * Support configurability of: * buildtarget (used to generat project name) * RootNamespace * relative_path_prefix (to prepend './') * tools (to avoid repetition in the project configs) * Track the Visual Studio hierarchy in SCons Nodes, not DOM, so we can delay evaluation until after the complete configuration has been specified. * Add a FileList base class for the things that need, with a subclass hierarchy for the different concrete things in our tree, and a FileListWalk() function for traversing hierarchies. * Centralize turning strings into Nodes in the args2nodes() method and have AddFiles() just use it. Updates to chromium_builders.py to support all this * Add knowledge about stripping out noncompilable files (.h files) from input_files lists. * Return a Null() class if we're not generating MSVS files so we don't have to hide the other calls in if:-blocks. * Add custom ChromeFileList subclass of MSVS.FileList as a container for the file list manipulation we need to do. * Move the Chrome*() function definitions out to global space, and just use the generate() function for adding them to the passed-in environment as class methods. * Make a change to SCons (in Node/FS.py) to handle polymorphism in the new MSVS Node hierarchy. Review URL: http://codereview.chromium.org/16447 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7467 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a memory leak in json_reader_unittest.ccaa@chromium.org2008-12-241-24/+26
| | | | | | Review URL: http://codereview.chromium.org/16475 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7466 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 7423.erikkay@google.com2008-12-232-13/+0
| | | | | | | After talking with Darin, I'm convinced this was a bad idea. The issue is that Linux can't actually know the encoding of the file (bad Linux!), so on Linux this method is nonsensical. It also turns out to not be useful for the case I thought I needed it for. Review URL: http://codereview.chromium.org/16252 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7455 0039d316-1c4b-4281-b951-d872f2087c98
* Add stdio to this file becasue we use FILE.nsylvain@chromium.org2008-12-231-0/+2
| | | | | | | | | | It starts failing with FILE, identifier not found, when you remove the include for logging.h, which is included in scoped_handle_win.h Review URL: http://codereview.chromium.org/16461 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7441 0039d316-1c4b-4281-b951-d872f2087c98
* file_util minor cleanup:erikkay@google.com2008-12-234-15/+58
| | | | | | | | | | * add POSIX version of IsPathWritable * convert IsPathWritable to FilePath * convert CreateNewTempDirectory to FilePath * fix a bug where recursive delete errors weren't being handled in POSIX Review URL: http://codereview.chromium.org/16241 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7430 0039d316-1c4b-4281-b951-d872f2087c98
* Add a method to explicitly request a UTF8 representation of a FilePath. ↵erikkay@google.com2008-12-232-0/+13
| | | | | | | | This is for places where you need to use a FilePath in a non-filesystem context (for example, adding a file to an archive file, or constructing a file:// URL). Review URL: http://codereview.chromium.org/16239 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7423 0039d316-1c4b-4281-b951-d872f2087c98
* Add FilePath support to FileVersionInfo, fix Mac memory issues.avi@google.com2008-12-233-11/+24
| | | | | | Review URL: http://codereview.chromium.org/15082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7417 0039d316-1c4b-4281-b951-d872f2087c98
* Update comments and remove bogus DCHECK in windows-specific broadcasted ↵mbelshe@google.com2008-12-231-4/+13
| | | | | | | | power message status. Review URL: http://codereview.chromium.org/16220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7398 0039d316-1c4b-4281-b951-d872f2087c98